Jump to content

[SOLVED] Brands not displaying on products miniatures


BenoitS

Recommended Posts

HI everyone,

I'm experiencing a quite weird issue on my products miniatures.

For the products miniatures part of my category page the brand is not showing.

I've checked on the code and there is no "display:none" on that element.

But the weird stuff is if I add a product to my cart or if I include some products in others pages (from my CMS Elementor), the brands are now showing.

You can see it in the enclosed screenshot.

On the left side, a product added to my cart, and on the right side a product not added to my cart.

Prestashop : 1.7.6.9 

Theme : Warehouse

If you have any idea, please let me know!

Thanks a lot!

Capture.PNG

Edited by BenoitS (see edit history)
Link to comment
Share on other sites

On 12/3/2020 at 9:00 PM, Guest said:

Unfortunately, I'm not at the computer today.
Tomorrow I would give you an exact solution for a warehouse template.

By any chance, did you have the time to have a look?

 

Thanks a lot for your help!

Link to comment
Share on other sites

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-1.tpl

or

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-2.tpl

or

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-3.tpl

find if exists:

{block name='product_name'}
        <h3 class="h3 product-title">
            <a href="{$product.canonical_url}">{$product.name|truncate:90:'...'}</a>
        </h3>
    {/block}

    {block name='product_brand'}
        {if isset($product.manufacturer_name ) && $product.manufacturer_name != ''}
            <div class="product-brand text-muted"> <a href="{$product.url}">{$product.manufacturer_name}</a></div>{/if}
    {/block}

 

Link to comment
Share on other sites

If you use a block in which you do not see the names of the manufacturers, you must show the whole page, or which module for the product list is not shown to you by the manufacturer.

Link to comment
Share on other sites

If you want to display the manufacturer in another module, you can use this code:

{block name='product_brand'}
        {if Manufacturer::getNameById($product.id_manufacturer) !== ''}
            <div class="product-brand text-muted"> <a href="{$product.url}">{Manufacturer::getNameById($product.id_manufacturer)}</a></div>{/if}
    {/block}

 

Edited by Guest (see edit history)
Link to comment
Share on other sites

13 hours ago, Guest said:

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-1.tpl

or

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-2.tpl

or

./themes/warehouse/templates/catalog/_partials/miniatures/_partials/product-miniature-3.tpl

find if exists:


{block name='product_name'}
        <h3 class="h3 product-title">
            <a href="{$product.canonical_url}">{$product.name|truncate:90:'...'}</a>
        </h3>
    {/block}

    {block name='product_brand'}
        {if isset($product.manufacturer_name ) && $product.manufacturer_name != ''}
            <div class="product-brand text-muted"> <a href="{$product.url}">{$product.manufacturer_name}</a></div>{/if}
    {/block}

 

I added your code and it works great! Thanks a lot

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...