Hello. I would like to use the "insert link" tool in the page editor to insert a link that puts a specific item in the user's cart. I am using an image as the "button" / link instead of a real button. Is there a url which will add a product to the cart that I can past into the url spot in the "instert link" tool? This would be very helpfull.
I'm basically trying to do the same thing as "using permalinks to pre load cart" but instead of taking the user to the payment page I want to take them to their cart.
Please help. Thanks!
The url would look something like this:
http://some-store.com/cart/add?id=123456789 /* or */ http://some-store.com/cart/add?id=123456789&quantity=9
Could you explain where the ID code comes from? Or perhaps how you made that direct Add to Cart link? I cannot find that ID code anywhere in my products. I have a link like the one you posted that a colleague made, but I can't figure out how to make one for another product.
Any help you can provide would be greatly appreciated!
Hey @BAllison, I was looking for an answer to that exact question... I found it in the video on this page:
The basics of it is adding ".xml" to the end of the URL of your Product page, then finding the <variant> tag/id. That's your product variant number that you need to add to a link like this:
<a href="http://wlabsinnovations.com/cart/add?id=yourvariantIDnumber&quantity=1">Buy Now</a>
Hope that helps!
This is the final add to cart URL to I settled with: https://www.yoursite.com/cart/add?id=VARIANTID&quantity=1