Jump to content

Custom product background


Recommended Posts

Hello, 

 

i found various ways how to change prestashop background when you want to have one and only color or picture. However I'm looking for a way how to have custom background on every product. For example, for product X1, I want to use Y1 background picture, for X2 - Y2, X3 - Y3.... etc. Is there any way to do that? 

 

thank you for sharing your thoughts! 

Link to comment
Share on other sites

You could try playing with the id in the body

body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if}

 

Append this to the id  {if isset($smarty.get.id_product)}_{$smarty.get.id_product}{/if}

So that you can target #product_1, #product_15, etc

  • Like 1
Link to comment
Share on other sites

You could try playing with the id in the body

 

body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if}

 

Append this to the id  {if isset($smarty.get.id_product)}_{$smarty.get.id_product}{/if}

 

So that you can target #product_1, #product_15, etc

 

what is the right syntax:

body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if}

 

Append this to the id  {if isset($smarty.get.id_product)}_{$smarty.get.id_product}{/if}

 

we sholud use this body{if isset($smarty.get.id_product)}_{$smarty.get.id_product}{/if} on the header.tpl page

that's true

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