Jump to content

[SOLVED] Brands not displaying on products miniatures


BenoitS
 Share

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)

Share this post


Link to post
Share on other sites

12 minutes ago, Guest said:

Add to product list tpl file 

{$manufacturer.name}

Hi, thanks for your reply.

Is-it the product-list.tpl file from catalogue/listing folder or from catalogue/partials/miniatures?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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!

Share this post


Link to post
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}

 

Share this post


Link to post
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.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

If you want to know exactly where the problem is, you have to share the e-shop address with me, for example in a private message.

Share this post


Link to post
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

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More