Ad

How To Redirect To Cart Page Using An SKU In The Permalink In Shopify

- 1 answer

Is there any way to add a product to cart in Shopify using a permalink with SKU as a parameter.

For example:

As we have: https://example.myshopify.com/cart/add?id=123456789&quantity=1

do we have something similar to this like : https://example.myshopify.com/cart/add?sku=AAABBB&quantity=1

Ad

Answer

No you can't.

In Shopify you buy the variant, which is passed using the variant ID.

The SKU is text that can be managed by the admin, so it can be the same for all your products if you like, this means that it's not an unique value in any way.

Ad
source: stackoverflow.com
Ad