Jump to content

[Solved] Add to cart = redirect to checkout


Recommended Posts

How to force prestashop to redirect straight to checkout after clicking add to cart ? client will click add to cart product will be added to cart BUT instantly client will be redirected to checkout.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Go to the configuration page of the "Cart block" and change "Ajax cart" to "No". Also, go to the Preferences > Products tab and make sure "Re-direction after adding product to cart" is set to "cart summary".

  • Like 1

Share this post


Link to post
Share on other sites

  • 5 weeks later...

Hi there. I have my client's site (v.1.3.7.0) set upi with ajax cart disabled and redirecttion set to cart summary, however when it is redirected, the cart is not on https even though ssl is enabled - how can I fix this?

Share this post


Link to post
Share on other sites

  • 1 year later...
Go to the configuration page of the "Cart block" and change "Ajax cart" to "No". Also, go to the Preferences > Products tab and make sure "Re-direction after adding product to cart" is set to "cart summary".

 

Hi rocky, thanks for your tip. However, I could not understand the process you given: Go to the configuration page of the "Cart block" and change "Ajax cart" to "No". Is that means go to blockcart.tpl file and find ajax cart and set it to "No". :/ Can you please help me out.. Thanks!

Share this post


Link to post
Share on other sites

  • 10 months later...
  • 3 months later...
  • 6 years later...
  • 1 year later...
Posted (edited)
On 6/19/2020 at 6:09 AM, Rajehs Kumar said:

Can someone give solution for PS 1.7 

Go to ps_shoppingcart.js file inside your modules/ps_shoppingcart module directory (I would hardly advise to do it in your theme folder, theme/modules/ps_shoppingcart/ps_shoppingcart.js) and go to line

if (resp.modal) {
  showModal(resp.modal);
}

Where you want to change it to:

if (resp.modal) {
	window.location.replace(prestashop.urls.pages.cart+'?action=show'); 
}

 

This will solve the issue when the customer is logged in or not (guest and customer).

Remember to clear the cache in var/cache by deleting the cache folder, otherwise your changes might be unaffected.

Edited by ChineseNorris (see edit history)
  • Like 1

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More