我想要在Shopify产品页面上设置便笺属性,只需单击一下立即购买按钮

问题描述

我使用Shopify update.js ajax API设置了属性,并且可以通过购物车页面进行结帐。

我如何添加属性如下。

jQuery.post('/cart/update.js',"attributes['attribute_Key']=attribute_Value");

但是如果有人使用“立即购买”按钮购买产品,则无法按顺序获取此属性。

enter image description here

我都希望使用该属性。

解决方法

您需要取消“添加到购物车”或“立即购买”按钮。 确保单击时未提交表单,然后将逻辑添加到click事件中。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...