Randaal Posted November 4, 2013 Share Posted November 4, 2013 I've been searching the web for any informations on how to display the word "from" before the price when there are attributes that influence the price. I haven't found any solution nor a module to make it happen. Does anyone from you know how to set it? Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 the question is: where you want to display this? Link to comment Share on other sites More sharing options...
Randaal Posted November 4, 2013 Author Share Posted November 4, 2013 In the Home Featured module and in categories/subcategories where the products are listed. Right before the price so a customer can see that the product starts with price X and can be more expensive with other attributes. For example a dog food package of 1,5 kg costs 300 and 10 kg costs 1500 so if it shows the customer that the price is "from" then he knows that it could be more but it could be this much even before he opens the product page Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 you can try to use this code: {if $product.id_product_attribute != 0 || $product.customizable != 2} {l s='price statrs from' mod='homefeatured'}{/if} Link to comment Share on other sites More sharing options...
Randaal Posted November 4, 2013 Author Share Posted November 4, 2013 in which file should I insert it? homefeatured.tpl? Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 yes in homefeatured.tpl file Link to comment Share on other sites More sharing options...
Randaal Posted November 5, 2013 Author Share Posted November 5, 2013 what is the difference between the shop/modules/homefeatured and shop/themes/default/modules/homefeatured? I mean how do I know in what folder I should make the changes? Link to comment Share on other sites More sharing options...
vekia Posted November 5, 2013 Share Posted November 5, 2013 if module file exist in theme directory it mean that you have to edit this one. it's because of feature named "overrides" http://doc.prestashop.com/display/PS15/Overriding+default+behaviors Link to comment Share on other sites More sharing options...
Randaal Posted November 5, 2013 Author Share Posted November 5, 2013 (edited) OK, so I've put it in the code and it shows exactly what I want and it works! But two things: 1) it appears even on products that have no attributes http://www.obchod.nicha.cz/index.php (the last product has none) 2) what piece of code should I put in .css to set the font similar to the price but smaller? The name of the line is just fine, setting it's actual appearance is easy and maybe how do I place it right before the price? The perfect look is as shown on this pic Edited November 5, 2013 by Randaal (see edit history) Link to comment Share on other sites More sharing options...
Randaal Posted November 5, 2013 Author Share Posted November 5, 2013 (edited) I've played with it pretty much and the only thing I need is to not show the "price starts from" (I changed it to only "From") when the product has no attributes. I now have it placed in the Home Featured module http://www.obchod.nicha.cz/index.php And in the Category List http://www.obchod.nicha.cz/index.php?id_category=4&controller=category Positioning it exactly as I wanted shouldn't much of a problem, it already has a css formatting so the only tweak is to not show it on products without attributes. Could you please help me with it? Thanks Vekia Edited November 5, 2013 by Randaal (see edit history) Link to comment Share on other sites More sharing options...
Randaal Posted November 5, 2013 Author Share Posted November 5, 2013 another progress: I need to set the code for appearing the word "From" in case that the product has attributes in group 2 (found in my SQL database) but it doesn't work in this state below. Could you please have look at it and tell me what to change? {if $product.id_attribute_group = 2}{l s='From' mod='homefeatured'}{/if} Link to comment Share on other sites More sharing options...
Randaal Posted November 7, 2013 Author Share Posted November 7, 2013 And done :-) it needed a bit of SQL editing and the code needed to be more complex because it couldn't read the product attribute group info in this state but it finaly works as needed. Anyway thanks for your time Vekia if it wasn't for you I wouldn't be able to get this done! Link to comment Share on other sites More sharing options...
Recommended Posts