我已经在我的网站上实现了Snipcart,我想用复选框提醒用户,具体取决于用户是否选中它以提高产品价格。 这是我的代码:
<button
class="snipcart-add-item btn btn-primary"
[attr.data-item-id]="selectedService._id"
[attr.data-item-price]="mainPrice"
data-item-url="http://localhost:4200/"
[attr.data-item-description]="selectedService.jsonData.description.en"
[attr.data-item-name]="selectedService.name"
data-item-custom1-name="Number of additional employees"
data-item-custom1-options="0|1[+25.00]|2[+50.00]|3[+75.00]|4[+100.00]|5[+125.00]|6[+150.00]|7[+175.00]|8[+200.00]|9[+225.00]|10[+250.00]"
data-item-custom2-name="Procure employment pass for USD 1,650.00 to allow a foreigner to serve as the local director."
data-item-custom2-options="false|true[+1650.00]"
>
在您的文档中,它表示如果“ data-item-options”的值是“ true | false”,则它将显示为一个复选框,但会显示为值为“ true”的下拉列表和“假”。我做错什么了吗,还有其他方法可以实现吗? 我也尝试过使用“ data-item-custom-type” =“复选框”,但是后来我没有选择增加产品价格的值(或者也许我只是没找到怎么做)
答案 0 :(得分:0)
复选框目前还不支持价格修改器,不过我们的团队将来会实现此功能。
就目前而言,我们建议您使用下拉菜单:
data-item-custom2-options="No|Yes[+1650.00]"