Remain on product page after add to cart

Hello,

I am looking for help with my store. I am looking to give customers the option to remain on the product page after they have added a product to their cart. At the moment customers are automatically redirected to the basket/checkout.

I have added an app which provides this facility, but the new add to cart button then appears alongside the existing add to cart button.

I have searched several guides to add the coding, but none of them seem to be working.

Could someone please advise where I’m going wrong?

Many thanks

Jordanah

Hello @JordanahMHM ,

We are AliReviews - All-in-one reviews solution to all businesses.

Here are the general steps you can follow:

  • Go to Online Store > Themes.
  • Find the theme you are using → click Actions button → select Edit Code.
  • In the theme files, locate the product.liquid or product-template.liquid file and click to open it.
  • Find the “Add to cart” button code in the product.liquid or product-template.liquid file. This code is usually located inside a form element that includes the action=“/cart/add” attribute.
  • Replace the existing code with the following code:

  • Save and test.

Hope this can help you out. Please hit the Like Button or mark this as Accepted Solution to let us know, it means a lot to us.

Regards,

AliReviews team.

Hello, thank you for your reply and sorry for the delay with mine!

I have clicked edit code but I can’t find theme files?

I have Layout, Template, Sections, Snippets, Config, Assets and Locales.

Many thanks

Jordanah

Edit: Sorry. Just figured out what you meant, thanks. I’m trying this but anything with the /cart/attribute

{{ 'products.product.add_to_cart' | t }}

This is the only code I could find that’s remotely similiar