简体   繁体   English

如何在Shopify的永久链接中使用SKU重定向到购物车页面

[英]How to redirect to cart page using an SKU in the permalink in Shopify

Is there any way to add a product to cart in Shopify using a permalink with SKU as a parameter. 是否可以使用以SKU作为参数的永久链接将商品添加到Shopify中的购物车中。

For example: 例如:

As we have: https://example.myshopify.com/cart/add?id=123456789&quantity=1 由于我们拥有: 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 我们是否有类似这样的东西: https : //example.myshopify.com/cart/add?sku=AAABBB&quantity=1

No you can't . 不,你不能

In Shopify you buy the variant, which is passed using the variant ID. 在Shopify中,您购买变体,并使用变体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. SKU是可以由管理员管理的文本,因此如果您愿意,它可以与所有产品相同,这意味着它在任何方面都不是唯一的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM