Jump to content

[Solved] Show the summary again above the payment modules on last step


Recommended Posts

Hello everybody,

I have to show again the cart summary above the payment details and add a button that empty the cart (cancel).
I mean the last step of the order. just above the payment gateways list.
Don't ask why! I know it's stupid but I have to do it this way.

Now, what I discovered by myself: I just add in step 3 on order.php displaySummary() before displayPayment()
Problem is that I have all the navigation buttons, and extra stuff like vouchers, etc.

Should I duplicate the displaySummary() function and duplicate & use other template than shopping-cart.tpl?
Can I do that? Is this affecting other things?

Thanks for help. Really appreciated Prestashop community answers.

Update: I should think before I posted! I have to edit displayPayment() function with some content of displaySummary() and edit order-payment.tpl with the content that I need from shopping-cat.tpl

:) Hope this will help somebody.

Link to comment
Share on other sites

  • 1 month later...

I just tell you above:

1. on order.php I added displaySummary() before displayPayment() function

   /* 4 steps to the order */
   switch (intval($step))
   {
       case 1:
           displayAddress();
           break;
       case 2:
           if(Tools::isSubmit('processAddress'))
               processAddress();
           autoStep(2);
           displayCarrier();
           break;
       case 3:
           if(Tools::isSubmit('processCarrier'))
               processCarrier();
           autoStep(3);
           checkFreeOrder();
           displayPayment();
           break;
       default:
           $smarty->assign('errors', $errors);
           displaySummary();
           break;
   }


2. edit displayPayment() function with some content of displaySummary()
I mean what you need from this function or the whole function. Around line 400 on order.php


3. edit order-payment.tpl with the content that I need from shopping-cat.tpl
Just to match the modifications on template files

Sorry, this change was working for me and should work for anybody but be sure you know what you are doing...
Also, be aware that hack will be overwritten at any Prestashop update!

Warning: If you are not sure what you are doing better ask for help. And, before everything backup your file before modify!

Link to comment
Share on other sites

  • 1 year later...

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...