I have been trying for hours now to add more than one of the custom attributes from SimpleCarts cart to the same column (like a concatenation). The furthest I can get is below:
I have my cart column set up:
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"}
],
I am trying to add the above attribute into this column as well:
{ view: function(item, column){return item.pouch-one() + " $" + item.quantity()*item.pouch-one-price;}, attr: "custom" ,label: "Quantity"},
As for the display of the columns in the cart, i would be hiding them anyways with a display of none.
Everytime I have tried, I have only been able to get the default normal fields simpleCart has (ID, Price, Qty and so on) just not any custom Attributes.
Is there a place I should be adding these into as a default field for SimpleCart?
The reason for these fields is the customer wants a breakdown of the main price as it is a grouped product.
Any help would be greatly appreciated. Thank you.
"+**item.get("pouch-two")**;}, attr: "custom" ,label: "Quantity"}, – AJL May 09 '14 at 18:39