shopbebe Posted April 30, 2012 Share Posted April 30, 2012 Hi. I have Prestashop 1.4.7.3 installed , Matrice Teme and I'm trying to get the shipping cost to show on product page (and product list if possible). Using other people's suggestion, adapting them, I got to here: The shipping cost shown in product.tpl is 0 until adding the product to cart, then, on refresh, it shows up right. Here's what I did: 1. Created override/controllers/ProductController.php with the following: <?php class ProductController extends ProductControllerCore { public function displayContent() { global $cart; self::$smarty->assign('shippingCost', $cart->getOrderShippingCost()); parent::displayContent(); } } ?> 2. Then, added {convertPrice price=$shippingCost} to product.tpl to display the shipping cost. I'm sure it could be done with the right code, but not being an expert, not by faaaar, I ave no idea how. Ideas? I guess the shipping cost shouldn't be called from $cart but from $carrier or something... 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