Jump to content

Linking 'Add to Cart' to external specific URLs for individual products

Go to solution Solved by creedon,

Recommended Posts

  • Replies 8
  • Views 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Amazing thank you! 

By chance do you know how to remove the quantity box from the product page? And is there any way you can open the page in a new browser rather than taking the customer away from the website? 

 

Link to comment

Set the Stock level to 1. This assumes you are not using the full (cart & checkout) SS e-commerce functionality.

To open in a new window/tab use the targetAtttributeValue setting in my code.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 4 months later...
1 hour ago, sarahirvine11 said:

I've tried adding it to a 7.1 site (https://www.henaraskinco.com/shop) and can't seem to figure out why it won't work. Did i miss a step?

You installed it correctly and it works on one product I tested on < https://www.henaraskinco.com/shop/p/cleansing-creme-mf85l > and it worked a treat.

Perhaps what is tripping you up is that my Store Product Detail Add to Cart Button Url Redirect code is design to work on product details pages (pdp) only.

I noticed that you have turned on ATC buttons on the product list pages (plp). I do not know of any code that does redirects for ATC buttons on the plp pages. I haven't addressed this need in my code. plp pages don't provide access to the sku for products. That is a barrier to end user ease of use in my mind. There are potential solutions to this particular issue but they are not straight forward and have some downsides.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
23 hours ago, creedon said:

You installed it correctly and it works on one product I tested on < https://www.henaraskinco.com/shop/p/cleansing-creme-mf85l > and it worked a treat.

Perhaps what is tripping you up is that my Store Product Detail Add to Cart Button Url Redirect code is design to work on product details pages (pdp) only.

I noticed that you have turned on ATC buttons on the product list pages (plp). I do not know of any code that does redirects for ATC buttons on the plp pages. I haven't addressed this need in my code. plp pages don't provide access to the sku for products. That is a barrier to end user ease of use in my mind. There are potential solutions to this particular issue but they are not straight forward and have some downsides.

Thank you so much @creedon! I see it now. Will update so no option for ATC on plp page!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.