我无法获得 2 个自定义属性以显示在 simplecart 中的尺寸或颜色结帐时。我能够为每一列生成标题,但我的两个自定义属性中没有显示任何数据。其他所有内容都在正确的位置,并且可以在我的整个网站上使用,但无论我做什么,我都无法在我的表格中显示尺寸或颜色属性。
html:
<h2 class="item_name">Peace on Earth T-Shirt</h2>
<img src="../images/products/decals/poep.png">
<span class="item_price"><h3>$17.99</h3></span>
<select class="item_size">
<option value="Small"> Small </option>
<option value="Medium"> Medium </option>
<option value="Large"> Large </option>
</select>
<input type="text" value="1" maxlength="2" size="2" class="item_Quantity">
<br>
<p><a class="item_add" href="javascript:;">Add to Cart!</a></p>
</div>
</div>
<div class="content-three-last" id="footer-right">
<div class="simpleCart_shelfItem">
<h2 class="item_name">Find Him Window Decal</h2>
<img src="../images/products/decals/fhw.png">
<span class="item_price"><h3>$3.99</h3></span>
<select class="item_color">
<option value="White"> White </option>
<option value="Pink"> Pink </option>
</select>
jQuery:
cartStyle : "div",
cartColumns : [
{ attr: "name", label: "Name" },
{ attr: "size", label: "Size" },
{ attr: "color", label: "Color" },
{ attr: "price", label: "Price", view: 'currency' },
{ view: "decrement", label: false },
{ attr: "quantity", label: "Qty" },
{ view: "increment", label: false },
{ attr: "total", label: "SubTotal", view: 'currency' },
{ view: "remove", text: "Remove", label: false }
],
结果:
购物车
名称 尺寸 颜色 价格 数量 小计
Find Him 窗户贴花 $3.99 - 1 + $3.99 移除
Peace on Earth T 恤 $17.99 - 1 + $17.99 移除
总计 21.98 美元
我无法发布结果图片,但是当我在表格上突出显示时,在这 2 列中的任何一个中都没有选择任何信息,因此我们将不胜感激!