Woocommerce - 在购物车中更改产品标题

时间:2014-09-30 14:57:55

标签: javascript php wordpress woocommerce

我想销售域名,我的产品以其扩展名(.uk,fr ...)命名。当用户检查此dn的有效性时,他可以使用“add_to_cart_button”按钮将其添加到购物车。我想检索用户在购物车中输入的字段。是否可以通过在扩展名之前添加dn来更改产品名称,这只是在购物篮中或通过向我的产品添加属性?这是我的代码:

JS: [...]

var dom =domaine.replace(/\.[^\\.]+$/,''); //Domain name without extension

[...]

'<button type="submit" data-quantity="1"  data-product_id=" '+ jsonObj[key[i]]['ID'] +'"'+'class="button alt add_to_cart_button product_type_simple">Add To Cart</button>'

[...]

0 个答案:

没有答案
相关问题