" itemTotal": 300
" orderableQuantity": 981
" orderableQuantityMessage": ""
" originalPrice": 150
" preOrderableQuantity": undefined
" priceChangedMessage": "This item's price has changed since it was added to your cart. Original price was: $150.00 "
" priceListGroupId": "defaultPriceGroup"
" productData": {olapicConfiguration: "9aebf6a8555dafedea6fff54c1c1b399", listVolumePrice: null, x_sLIMFIT: "Fundamental warmth fashioned for everyday.", x_isReversible: false, merchandisingText: null, …}
" productId": "WJM44500C1"
" productPriceChanged": false
" quantity": 2
" rawTotalPrice": 300
" repositoryId": "ci25005140"
" selectedOptions": (2) [{…}, {…}]
" selectedSkuProperties": []
" serviceAccountId": undefined
" serviceId": undefined
" shippingGroupRelationships": [{…}]
" shopperInput": undefined
" skuProperties": undefined
" stockState": "IN_STOCK"
" stockStatus": true
您好我正在使用 Oracle Commerce Cloud 平台,商品数量的购物车页面我使用输入类型编号,因为我使用数据绑定文本输入来设置输入框的值,问题是输入框不是每次都保持为空但是如果我随机加载并来到购物车页面
下面的 js 显示了每次加载购物车页面时应该显示的默认值。对于调试,我使用文本绑定来检查该值是否设置正确,然后查看我最终是否工作正常,DOM 中的某些东西正在影响它可以有人帮助吗?
quantity: ko.observable(1),
<!-- ko if: $data.itemTotal() > 0 -->
<input data-bind="textInput : quantity,event:{change:$parentContext.$parent.updateQty}" name="quantity" id="quantityPress" type="number" min="1">
<div data-bind = "text : quantity"></div>
<!-- /ko -->