0

几个小时以来,我一直在尝试将 SimpleCarts 购物车中的多个自定义属性添加到同一列(如串联)。我能得到的最远距离如下:

我设置了购物车列:

    cartColumns: [
    { attr: "name", label: "Name"},
    { attr: "pouch-one", label: "Content1"}, -- Custom Attribute One -- 
    { attr: "pouch-one-cost", label: "Content2"}, -- Custom Attribute Two --
    { view: "currency", attr: "price", label: "Price"},
    { view: "decrement", label: false},
    { attr: "quantity", label: "Qty"},
    { view: "increment", label: false},
    { view: "currency", attr: "total", label: "SubTotal" },
    { view: function(item, column){return item.quantity();}, attr: "custom" ,label: "Quantity"},
    { view: "remove", text: "Remove", label: "Remove Line Item"}
],

我也在尝试将上述属性添加到此列中:

    { view: function(item, column){return item.pouch-one() + " $" + item.quantity()*item.pouch-one-price;}, attr: "custom" ,label: "Quantity"},

至于购物车中列的显示,无论如何我都会将它们隐藏起来,显示为无。

每次我尝试过,我只能获得 simpleCart 的默认普通字段(ID、Price、Qty 等),而没有任何自定义属性。

有没有我应该将这些添加到 SimpleCart 的默认字段的地方?

这些字段的原因是客户想要主要价格的细分,因为它是一个分组产品。

任何帮助将不胜感激。谢谢你。

4

0 回答 0