How to add product to cart using link from blog

resboss
Shopify Partner
32 0 5

I would like to generate a links so user could easily from blog page to add product to cart.

 

I know about 

  1. <p><a href="http://your-store.com/cart/70881412:1">Buy this item</a></p>

    but it redirect direct to checkout page

Is it possible to have a link which will just add product to cart and implement discount code.

 

Thanks

Replies 4 (4)

Dirk
Shopify Staff
2301 253 513

Hey, @resboss 

 

What you are looking for are known as pre-loaded cart permalinks. We actually have a step-by-step guide here on how you can create them. This will allow you to copy/paste them into your blog posts for visitors to click on and quickly make a purchase.

 

If there is anything else I can help you with, please let me know.

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

resboss
Shopify Partner
32 0 5

but I just need to add to card not to redirect to checkout page. Is that possible?

onescales
Shopify Partner
51 2 10

here you go - 

https://{store-name}.myshopify.com/cart/add?id={variant-id}

OneScales.com Teaches Shopify and Solves Ecommerce Problems for Free. We Also Share Insight about E-commerce, Web, Tech, AI, Analytics, SEO, PPC, Marketing and More.
onescales
Shopify Partner
51 2 10

we made a tool and tutorial about it: https://www.youtube.com/watch?v=E9DC631wYuU

OneScales.com Teaches Shopify and Solves Ecommerce Problems for Free. We Also Share Insight about E-commerce, Web, Tech, AI, Analytics, SEO, PPC, Marketing and More.