I need to show the product brand in the frontend general catalog grid list. Actually it's displaying the product image above and below it the product name and price.

I found the file I need to edit which is the following path:


This is the code showing the product name and price:

<div class="product details product-item-details">
        <h5 class="product name product-item-name">
                <a class="product-item-link" href="<?php echo $_product->getProductUrl() ?>">
                        <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>

        <?php if(!$themeHelper->getStoreConfig('mpanel/catalog/review')): ?>
                <?php echo $block->getReviewsSummaryHtml($_product, $templateType,true); ?>
        <?php endif ?>

        <?php echo $block->getProductPrice($_product) ?>

        <?php echo $block->getProductDetailsHtml($_product); ?>
        <?php if ($themeHelper->getStoreConfig('mpanel/catalog/disable_add_to_cart') == 0 && $themeHelper->getStoreConfig('mpanel/catalog/disable_hover_effect') == 1): ?>
                <?php if ($_product->isSaleable()): ?>
                                <?php $postParams = $block->getAddToCartPostParams($_product); ?>
                                <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $this->getUrl('checkout/cart/add', ['uenc'=>$postParams['data']['uenc'], 'product'=>$postParams['data']['product']]); ?>" method="post">
                                        <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                        <input type="hidden" name="uenc" value="<?php /* @escapeNotVerified */ echo $postParams['data']['uenc']; ?>">
                                        <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
                                        <button class="action tocart btn-cart hover_effect" type="submit" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
                                                <span class="icon pe-7s-shopbag"></span>
                                                <span class="text"><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
                <?php endif ?>
        <?php endif ?>
  • what is the attribute code of brand attribute ? – Pawan Sep 18 '19 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.