chilumo Posted October 23, 2015 Share Posted October 23, 2015 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 More sharing options...
NemoPS Posted October 24, 2015 Share Posted October 24, 2015 You could try playing with the id in the bodybody{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 1 Link to comment Share on other sites More sharing options...
chilumo Posted October 29, 2015 Author Share Posted October 29, 2015 Hi, thanks for an answer? Should I edit product.tpl file in themes folder or something else? Link to comment Share on other sites More sharing options...
NemoPS Posted October 30, 2015 Share Posted October 30, 2015 Oh, no, it's header.tpl in the theme folder Link to comment Share on other sites More sharing options...
informatikadomicile Posted November 6, 2015 Share Posted November 6, 2015 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 More sharing options...
NemoPS Posted November 6, 2015 Share Posted November 6, 2015 (edited) Actually it seems you can do that already with classes, I made a tut on it, it will be on next monday. Use it like .category-id, so for example .category-8 {background:red} or in your case .product-9 Edited November 6, 2015 by Nemo1 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now