vasikgreif Posted October 1, 2010 Share Posted October 1, 2010 Hi, I cannot figure out how to display "You save" price in the product.tpl. By you save price I mean (original price - new price) ... Thanks for help... Link to comment Share on other sites More sharing options...
jasmine Posted December 15, 2010 Share Posted December 15, 2010 I also wanted to display 'You Save'. What I did was create a new function using $product->getPrice (in product.php) and for the parameter $only_reduc, I changed the value to 'true'. For $usereduc, I changed the value to false.This ensured that I got the Reduction Value.Try and let me know if this info was helpful :-) Link to comment Share on other sites More sharing options...
probashi Posted February 15, 2011 Share Posted February 15, 2011 Jasmine, can you please give code example of how you achieved thismany thanks Link to comment Share on other sites More sharing options...
jasmine Posted May 2, 2011 Share Posted May 2, 2011 sorry, missed your post. Here is the code. /** * Get product price * Same as static function getPriceStatic, no need to specify product id * * @param boolean $tax With taxes or not (optional) * @param integer $id_product_attribute Product attribute id (optional) * @param integer $decimals Number of decimals (optional) * @param integer $divisor Util when paying many time without frais (optional) * @return float Product price in euros */ public function getPriceReduc($tax = true, $id_product_attribute = NULL, $decimals = 6, $divisor = NULL, $only_reduc = true, $usereduc = false, $quantity = 1) { return self::getPriceStatic(intval($this->id), $tax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity); } 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