Jump to content

How to display shipping cost on order confirmation page (last page)?


mormoniusz

Recommended Posts

  • 2 weeks later...

That information isn't available on that page. You will need to add it. Create override/controllers/OrderConfirmationController.php with the following:

 

<?php

class OrderConfirmationController extends OrderConfirmationControllerCore
{
   public function displayContent()
   {
       global $cart;

       self::$smarty->assign('shippingCost', $cart->getOrderShippingCost());

       parent::displayContent();
   }
}

?>

 

You should then be able to add {convertPrice price=$shippingCost} to order-confirmation.tpl to display the shipping cost.

  • Like 1
Link to comment
Share on other sites

Hello,

By creating or using this override code, does it remove the shipping from the cart until checkout?

I'm using the matrice theme on v 1.3.2 but wish to remove shipping from total in cart until end.Been looking all over for the solution but have come up unsuccessful. Any help would be greatly appreciated.

Thank you

Link to comment
Share on other sites

Thank you for such a quick response.

By subtract, do you mean comment out or completely remove? Im unsure exactly where the code is and how to edit it... shopping-cart.tpl, blockcart.tpl, blockcart-json.tpl?

Link to comment
Share on other sites

hey I am using PS 1.3.6. Hope this works for you.

In order-confirmation.php file, add the following code;

 

$summary = $cart->getSummaryDetails();

$customizedDatas = Product::getAllCustomizedDatas(intval($cart->id));

Product::addCustomizationPrice($summary['products'], $customizedDatas);

$smarty->assign($summary);

Link to comment
Share on other sites

Hey I am using PS 1.3.6. Hope this helps

 

Add the below in order-confirmation.php file

 

$summary = $cart->getSummaryDetails();

$customizedDatas = Product::getAllCustomizedDatas(intval($cart->id));

Product::addCustomizationPrice($summary['products'], $customizedDatas);

$smarty->assign($summary);

 

Then add the below in order-confirmation.tpl file

{displayPrice price=$shippingCost}

OR

{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency convert=0}

 

Just check which one of the above 2 works for you.

Link to comment
Share on other sites

Thank you for your help, unfortunately it doesnt work on my version or im just not putting the code(s) in the right spot. my knowledge on coding is limited to youtube videos and what i learn from this forum. lol. im still trying to figure this out. Anymore suggestions would be helpful and greatly appreciated.

Link to comment
Share on other sites

  • 2 years later...

Hi!

I use Prestashop 1.4.6 and I would like to show shipping cost in product page under the product price.

Something like "We ship this product from ..."

always display the price of the same carrier and the same area.

 

thank you very much

Link to comment
Share on other sites

  • 1 year later...

That information isn't available on that page. You will need to add it. Create override/controllers/OrderConfirmationController.php with the following:

 

<?php

class OrderConfirmationController extends OrderConfirmationControllerCore
{
    public function displayContent()
    {
        global $cart;

        self::$smarty->assign('shippingCost', $cart->getOrderShippingCost());

        parent::displayContent();
    }
}

?>
You should then be able to add {convertPrice price=$shippingCost} to order-confirmation.tpl to display the shipping cost.

 

I know this is old but i need to get the other variables to show on the confirmation page.

using 1.4.0.9

i want to show order details on page after payment. cant work out how to create those variables that i need.

any help?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...