miss-d Posted March 5, 2013 Share Posted March 5, 2013 (edited) Hi guys, we use a very VERY modified 1.3 and we would like to be able to enter comma-quantity discounts in admin unter percent discount - which presta handles really well in backend but what we need is a rounded view for the frontend product page. So, if we enter a % discount of lets say 10.11123% in backend we display it in frontend product page like this: "You save 10.11123%" - and we use the {$product->reduction_percent} variable for this in product.tpl - what we want is only display "You save 10%" without the commas in frontend - is that possible? Can anyone help? =) Thanks! Edited March 6, 2013 by miss-d (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted March 5, 2013 Share Posted March 5, 2013 I see you use smarty there, so try this: {math equation="x + y" x=$product->reduction_percent y=0 format="%.0f"} Hope it works. Didn't try it.... Pascal Link to comment Share on other sites More sharing options...
miss-d Posted March 6, 2013 Author Share Posted March 6, 2013 *thumbs up* that worked perfectly!! Thanks a lot Pascal!!! Link to comment Share on other sites More sharing options...
PascalVG Posted March 7, 2013 Share Posted March 7, 2013 Glad I could help. :-) 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