Jump to content

[SOLVED] Skip the cart summary page


roboy

Recommended Posts

Hello community,

I'm wondering if it would be possible to skip the cart summary page and go straight to the checkout page in PS 1.7?

What I mean is that when a customer presses the "Proceed to checkout" button in the cart, he/she will end up straight at the checkout page without first having to go through the cart summary page.

Any advice would be highly appreciated.

Best regards,

Robin

Edited by roboy (see edit history)
Link to comment
Share on other sites


Thanks a lot for your answer. I have scanned through the OrderController.php file, but I'm not sure where to make the changes. Probably my limited knowledge of php is to blame. In case you or someone else in this great community knows, I would be very grateful for some further assistance in changing the code.

Link to comment
Share on other sites

Thanks Verlonimo! I tried that, but unfortunately without luck. I didn't make any override in the override folder since I have read that overrides don't work anymore in PS 1.7. Instead I changed the original file in modules/ps_shoppingcart/ps_shoppingcart.tpl exactly as you prescribed. I have no caching activated in the shop and it's set to 'force compile'. I also tried clearing the browser cache, but still no result.

My test-shop is here if you or anyone else would like to take a look: https://sandbox2.eluxson.se/

Link to comment
Share on other sites

Here is the part of ps_shoppingcart.tpl where I made the change:

<div class="header">
    <a rel="nofollow" href="{$urls.pages.order}">
      <span>{l s='Cart' d='Shop.Theme.Actions'}</span>
      <span>{$cart.summary_string}</span>
    </a>
</div>

 

Link to comment
Share on other sites

Hi,

The part of the code where you made changes looks correct.

Not sure where you got such info but overrides still works...

If you changed the original file and that made no difference then i only can think that your theme has override of the module so check if you have some overrides in: yourtheme/modules/ps_shoppingcart/...

else you may have different shopping cart module then prestashop default.

Thanks

Link to comment
Share on other sites

On 5/9/2020 at 11:21 PM, roboy said:

What I mean is that when a customer presses the "Proceed to checkout" button in the cart, he/she will end up straight at the checkout page without first having to go through the cart summary page

I also read this....

Anyway, solutions are offered so he can decide what is better for him....

Link to comment
Share on other sites

On 5/12/2020 at 11:01 PM, ndiaga said:

You  don't  need  to  edit a  template  or edit  any  module,  what  you  need  is  to   redirect  the  customer  to next  step after  cart  summary.

Again read  this  file  and  you will  understand :    OrderController.php

I'm afraid it's not obvious to me what changes I should make in the OrderController.php file. Just to make clear what I'm asking for, I would like my customers to skip the order summary page and jump straight to the checkout page when I hit 'Proceed to checkout' in the cart. There is already a product summary on the checkout page so the separate summary page is an unnecessary step that doesn't add any value for my customers. I would really appreciate if you could provide me with the necessary code change(s) in order to achieve this.

Link to comment
Share on other sites

Hi,

I am confused now... i always was thinking about cart module (ps_shoppingcart). So where you want to skip it: cart module which is usually on the top right corner of the page, cart page which shows products and proceed to checkout button and there is also some order summary shown in checkout payment step as well... unless there is something special with your theme.

Thanks

Link to comment
Share on other sites

12 hours ago, ndiaga said:

Hi,

You  can  even use  the   CartController.php     there  the  shopping  cart  step  is :   cart?action=show

so  you  can  do this :


if(Tools::getValue('action') === 'show')
{
Tools::redirect('cart?action=checkout');
}

 

Ndiaga, I have searched through CartController.php, both using text search and manually scrolling through the file, but I can't find the above text strings. I'm currently running PS 1.7.6.2. Is it PS 1.7 you are referring to? Could you then please provide me with a line number?

Verlonimo, sorry for confusing you! Can we agree that when you press 'Proceed to checkout' in the ajax cart (usually top right corner of the shop, in the header area) you are not directed straight to the checkout page, but instead to a separate cart summary page where you can see the products that are put in the cart? What I want is to skip that page and instead go straight to checkout. I have attached a screenshot of the page I want to skip.

cart-summary.png

Link to comment
Share on other sites

Hi,

@roboy

So you should use my solution provided. If you using default shopping cart module then check for overridesnin theme... also dont forget to clear cache after changes.

@ndiaga

for such simple task where he want just to change link, controller override would be overkill here.

Thanks

Link to comment
Share on other sites

Ok @ndiaga, now I got it (obvious newbie 😄).

Finally I went with your solution @Verlonimo and it's working great. I'm sure the other solution would have worked equally great and I believe it's good having alternative solutions at hand in case a future version renders one of them impossible or difficult to implement.

Tons of thanks to both of you for taking your time and for having such patience!

 

  • Like 2
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...