Jump to content

Changing the code of the checkout buttons


roboy

Recommended Posts

Hello community,

I would like to change the behavior of the checkout buttons that for example appear in the cart. When pressed I would like them to link to a different checkout page instead of the ordinary one. The problem is that I can't find where the checkout button is defined so to change the code. I would be very grateful if anyone could guide med to the right file.

Link to comment
Share on other sites

On 11/12/2023 at 4:18 AM, roboy said:

Hello community,

I would like to change the behavior of the checkout buttons that for example appear in the cart. When pressed I would like them to link to a different checkout page instead of the ordinary one. The problem is that I can't find where the checkout button is defined so to change the code. I would be very grateful if anyone could guide med to the right file.

Hello,

Could we have your PrestaShop version and the page where the button is located?

Link to comment
Share on other sites

./themes/your_theme/modules/ps_shoppingcart/modal.tpl variable {$cart_url}

./themes/your_theme/templates/checkout/_partials/cart-detailed-actions.tpl variable {$urls.pages.order}

......

instead of these variables, you can use the function get apge link (if it is a registered link in SEO & URLs).

or possibly a direct link if you don't have a multilingual e-shop.

 

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

On 11/12/2023 at 4:18 AM, roboy said:

Hello community,

I would like to change the behavior of the checkout buttons that for example appear in the cart. When pressed I would like them to link to a different checkout page instead of the ordinary one. The problem is that I can't find where the checkout button is defined so to change the code. I would be very grateful if anyone could guide med to the right file.

 

On 11/12/2023 at 4:18 AM, roboy said:

Hello community,

I would like to change the behavior of the checkout buttons that for example appear in the cart. When pressed I would like them to link to a different checkout page instead of the ordinary one. The problem is that I can't find where the checkout button is defined so to change the code. I would be very grateful if anyone could guide med to the right file.

Hi.

If you need help, enter as much information as possible. The attached pictures of your request are many times faster than a lengthy explanation that maybe only you can understand. We don't really have fortune telling or paranormal powers, we can't read your mind.
Thank you for explaining everything to us.

A person registered in 2010 already has some experience.

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

Thank you both for coming to aid!

My PS version is 1.7.6.2.

The page is here: https://sandbox2.eluxson.se/

I have now gotten the cart (blue colored in the menu bar to the right) to work the way I want. The button "TILL KASSAN" ("checkout") takes the customer to the new checkout page, which is exactly what I want. I achieved that by modifying the /modules/ps_shoppingcart/ps_shoppingcart.tpl file.

However, when you add a product to cart there is a white/green popup window asking if you want to continue shopping or go to checkout. If you press "GÅ TILL KASSAN" (go to checkout") it takes you to the old checkout page, which is not what I want. In order to better understand the problem, please add some product to cart and try go to checkout, first using the blue cart button (up in the menu bar to the right) and then using the green button in the popup message.

Do you have any idea as to how I could change the behavior of the green button in order to make it point to the new checkout page (the one with the url: https://sandbox2.eluxson.se/module/sveacheckout/checkoutpage)?

 

 

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