kate5000 Posted April 2, 2010 Share Posted April 2, 2010 Hi Wise Ones,I am trying to figure out how I can add the phrase "as low as" in small font next to the price of an item?So, for example, if you clicked on a category in my website and were looking at all the products, the price of each one would look something like this:as low as $1.60The reason why (in case you were wondering) is because I am going to be using the attribute fields to create a dropdown that customers will choose their quantity from; ie: 10 cards @ $2.00 each is $20.00. 20 cards @ $1.95 each is $39, etc.I'm hoping this is something I can do myself, I have very limited programming skills. I appreciate your help greatly!Kate Link to comment Share on other sites More sharing options...
outlet.ee Posted April 3, 2010 Share Posted April 3, 2010 Go to themes/prestashop/product-list.tpl and find the line {convertPrice price=$product.price} and change it to: as low as {convertPrice price=$product.price}. If you have a multi-language shop you need to have it as: {l s='as low as'} {convertPrice price=$product.price} and then change the traslation for each language. Depending how you have configured the tax displaying you may need to change the line {convertPrice price=$product.price_tax_exc} also the same way - basically everything starting with {convertPrice.... you need to add the 'as low as' before it. Link to comment Share on other sites More sharing options...
kate5000 Posted April 3, 2010 Author Share Posted April 3, 2010 You are amazing! Many, many thanks!KateSweet Cricket Stationery Link to comment Share on other sites More sharing options...
kate5000 Posted April 3, 2010 Author Share Posted April 3, 2010 ok, this worked great...but now I am having an issue.The "as low as" shows when the page is loading and then when the page is done loading, it disappears. ????Thanks for anyone who can help me out with this!Kate Link to comment Share on other sites More sharing options...
rocky Posted April 4, 2010 Share Posted April 4, 2010 That's because the default place is replaced by the attribute price using Javascript. You need to change lines 257-260 of js/product.js in your theme's directory from: $('#our_price_display').text(formatCurrency(priceProduct, currencyFormat, currencySign, currencyBlank)); $('#pretaxe_price_display').text(formatCurrency(productPricePretaxed, currencyFormat, currencySign, currencyBlank)); $('#old_price_display').text(formatCurrency(productPriceWithoutReduction2, currencyFormat, currencySign, currencyBlank)); $('#ecotax_price_display').text(formatCurrency(selectedCombination['ecotax'], currencyFormat, currencySign, currencyBlank)); to: $('#our_price_display').text('As low as ' + formatCurrency(priceProduct, currencyFormat, currencySign, currencyBlank)); $('#pretaxe_price_display').text('As low as ' + formatCurrency(productPricePretaxed, currencyFormat, currencySign, currencyBlank)); $('#old_price_display').text('As low as ' + formatCurrency(productPriceWithoutReduction2, currencyFormat, currencySign, currencyBlank)); $('#ecotax_price_display').text('As low as ' + formatCurrency(selectedCombination['ecotax'], currencyFormat, currencySign, currencyBlank)); Link to comment Share on other sites More sharing options...
kate5000 Posted April 5, 2010 Author Share Posted April 5, 2010 Rocky, that worked! THANK YOU!!I am able to see the "as low as" on the individual product pages right next to the price.Any chance you could point me in the right direction of having it say "as low as" at the category level too?http://www.sweetcricket.com/6-birth-announcementsTo both of you, many thanks for taking the time to help me. I truly appreciate your kindness.Kate Link to comment Share on other sites More sharing options...
rocky Posted April 6, 2010 Share Posted April 6, 2010 You'll need to change line 18-19 of product-list.tpl in your theme's directory: {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if} {if $priceDisplay}{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='-Tx'}{/if}{/if} to: {if !$priceDisplay || $priceDisplay == 2}{l s='As low as'} {convertPrice price=$product.price}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if} {if $priceDisplay}{l s='As low as'} {convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='-Tx'}{/if}{/if} Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 8, 2011 Share Posted June 8, 2011 Would this be the same as for 1.4.2.5?Regards,Mark. Link to comment Share on other sites More sharing options...
rocky Posted June 9, 2011 Share Posted June 9, 2011 Yes, the line numbers will be different, but the principle is the same. Search for all prices in the TPL files and add 'Add low as' before the price and edit js/product.js in your theme's directory to add it to the start of the text function calls for all the prices. Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 9, 2011 Share Posted June 9, 2011 This doesn't seem to work on 1.4, I need it to show 'from only' before the price in the product list on the products that only have attributes, in 1.3 the code is like in the product-list.tpl {if $product.id_product_attribute}{l s='from only'}{/if} {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} I have tried to put {if $product.id_product_attribute} before 'from only' and this doesn't work in 1.4 Any help please?Regards,Mark. Link to comment Share on other sites More sharing options...
rocky Posted June 10, 2011 Share Posted June 10, 2011 I just tested that code you posted on my PrestaShop v1.4.2 test site and it worked fine. Check to make sure that "Force compile" is set to "Yes" on the Preferences > Performance tab to make sure the modified file was recompiled. Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 10, 2011 Share Posted June 10, 2011 Hi Rocky, thank for your reply, "Force compile" is set to yes, the code I posted works but for every product I have, I just need it to show on the products that have attributes only.Regards,Mark. Link to comment Share on other sites More sharing options...
rocky Posted June 10, 2011 Share Posted June 10, 2011 The code you posted above displays "from only" only on products with attributes on my test site. It shouldn't display on all products unless you've added attributes to all products. How did you create your attributes? Did you use the "Product combinations generator", the "4. Combinations" tab or the CSV import? Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 10, 2011 Share Posted June 10, 2011 I used the product combinations generator along with Tomer's AW module.Regards,Mark. Link to comment Share on other sites More sharing options...
rocky Posted June 10, 2011 Share Posted June 10, 2011 It might be the AW module causing the problem. I think it uses a different method to store attributes. You might need to ask Tomer about it. Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 10, 2011 Share Posted June 10, 2011 The code I pasted earlier is what is working with Tomer's module on 1.3, nothing changed on his module to get this to work on 1.3, thanks for your help anyway..Regards,Mark. Link to comment Share on other sites More sharing options...
thehandlestudio Posted July 12, 2011 Share Posted July 12, 2011 Please any more help on this as I still can't get it to work properly????Regards,Mark. 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