Jump to content

Layeredsearch - Image not showing


LauraPresta

Recommended Posts

Hello guys,

 

Yes there is another topic for a similar problem but this is not the same than mine. (yeah i'm lucky i know !)

 

I can't succeed to make the image of the layeredsearch (the hair color attributs) appear, and it looks like the image are not found but everything work nice on the other parts (like for product-list ou product)

 

exemple of page (problem was already there before moving layeredblock to mid page) : https://www.jeveuxmescheveux.fr/fr/39-perruque-perucci

 

the way image are called in product-list.tpl is same than the layeredsearch module tpl..

 

Any idea ?

Link to comment
Share on other sites

It's an old bug in PrestaShop that has been fixed in the latest version. Look for the line of code with #ccc in it at about line 90 of themes/<your_theme>/modules/blocklayered/blocklayered.tpl and make sure the file_exists part looks like the following:

{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if}

My guess is that your theme is based on the old code that had the bug.

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...