ruisonika Posted October 27, 2020 Share Posted October 27, 2020 Hello guys, Does anybody knows how to achive this? I wanna show product base price no matter what is the customer, discounts whatever...Because my shopping-cart-product-line.tpl when i make {$product|print_r} to see all variables that i could use, base_price isn't there... is there some way to get this value? Link to comment Share on other sites More sharing options...
JBW Posted October 28, 2020 Share Posted October 28, 2020 Are you looking for Unit Price? $product.unit_price_full !? Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 1 hour ago, JBW said: Are you looking for Unit Price? $product.unit_price_full !? I've tested what you have said {$product.unit_price_full} but in shopping-cart-product-line.tpl nothing happens. I have specific prices for group of clients and all is right but i wanna show in shopping-cart-product-line.tpl the base price of the product like old price, to customer see the diference he/she has. If i do {$product|print_r} to see all fields available i don't have the price from ps_product.price that have the price i want...also in product detail tpl i've printed all fields and the right field is base_price. Thanks for all your help. Link to comment Share on other sites More sharing options...
Guest Posted October 28, 2020 Share Posted October 28, 2020 {Tools::displayPrice ($product.price, $currency)} Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 11 minutes ago, Guest said: {Tools::displayPrice ($product.price, $currency)} didn't work Link to comment Share on other sites More sharing options...
Guest Posted October 28, 2020 Share Posted October 28, 2020 recompile template And clear cache Link to comment Share on other sites More sharing options...
Guest Posted October 28, 2020 Share Posted October 28, 2020 Prestashop version ? Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 5 minutes ago, Guest said: Prestashop version ? 1.6 Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 18 minutes ago, Guest said: recompile template And clear cache I did it and nothing, i've attached 2 images, one of the shooping cart and other of detail product (that one is right). Link to comment Share on other sites More sharing options...
EvaF Posted October 28, 2020 Share Posted October 28, 2020 try {convertPrice price=$product.price_without_reduction} other prices computed for $product in the cart $product.price_with_reduction $product.price (== $product.price_with_reduction_without_tax ) $product.price_wt Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 3 hours ago, EvaF said: try {convertPrice price=$product.price_without_reduction} other prices computed for $product in the cart $product.price_with_reduction $product.price (== $product.price_with_reduction_without_tax ) $product.price_wt Thanks @EvaF but doesn't like i want Link to comment Share on other sites More sharing options...
EvaF Posted October 28, 2020 Share Posted October 28, 2020 aha, ok, in this case try to add the price you want directly into cart.php this way: at the line 641 (i.e. before the $row['price'] is changed $tax_calculator = TaxManagerFactory::getManager($address, $id_tax_rules_group)->getTaxCalculator(); $row['base_price'] =$row['price']; $row['price_without_reduction'] = Product::getPriceStatic(.... and try in tpl {convertPrice price=$product.base_price} if it works, you can find the cleaner way Link to comment Share on other sites More sharing options...
ruisonika Posted October 28, 2020 Author Share Posted October 28, 2020 6 minutes ago, EvaF said: aha, ok, in this case try to add the price you want directly into cart.php this way: at the line 641 (i.e. before the $row['price'] is changed $tax_calculator = TaxManagerFactory::getManager($address, $id_tax_rules_group)->getTaxCalculator(); $row['base_price'] =$row['price']; $row['price_without_reduction'] = Product::getPriceStatic(.... and try in tpl {convertPrice price=$product.base_price} if it works, you can find the cleaner way @EvaF you are the best, thanks again 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