JPRIETO Posted September 9, 2012 Share Posted September 9, 2012 i would like to display the total amount of the order on the confirmation page how can that be done? but i want the total for products only -- without taxes or shipping cost any pros here that can kindly help me on this? thanks Link to comment Share on other sites More sharing options...
shokinro Posted September 9, 2012 Share Posted September 9, 2012 (edited) I assume you are talking about the order confirmation page after after payment. Most module will pass back "id_cart" as URL parameter. You can use this to get Total amount from cart, then set it to smarty variable, this has to be done in OrderConfirmationController.php. after following lines public function preProcess() { parent::preProcess(); $this->id_cart = (int)(Tools::getValue('id_cart', 0)); INSERT following lines $theCart = new Cart($this->id_cart); $total_products = $theCart->getOrderTotal(false, Cart::ONLY_PRODUCTS); self::$smarty->assign('total_products ', $total_products ); Then you can use variable at theme file /themes/YourTheme/order-confirmation.tpl {l s='You total amount of products is:'} {$total_products } Hope this helps Note: Condition, the payment must pass the id_cart to the order-confirmation.php page. (usually most payment module will do that) Edited September 9, 2012 by shokinro (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts