0

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.

martynas
  • 12,120
  • 3
  • 55
  • 60
AJL
  • 13
  • 3
  • 1
    Found the Answer in case anyone needs it: { view: function(item, column){return **item.get("pouch-one")**+"
    "+**item.get("pouch-two")**;}, attr: "custom" ,label: "Quantity"},
    – AJL May 09 '14 at 18:39
  • I couldn't Mark myself as answered... to new here – AJL May 09 '14 at 18:40

0 Answers0