Skip to content

Commit 151083d

Browse files
committed
added additionalData
1 parent 2709556 commit 151083d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plugins/Shopify.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262
currentCartItem.quantity += quantity;
263263
currentCartItem.keys.push(item.key);
264264

265+
// add any additional information of the item
265266
for (let j = 0; j < this.additionalItemData.length; j++) {
266267
const itemAttr = this.additionalItemData[j];
267268
currentCartItem.additionalData[itemAttr] = item[itemAttr];
@@ -271,6 +272,7 @@
271272
// nothing to update, this is an invalid result
272273
}
273274

275+
// add any requested additional data from the cart instance
274276
for (let i = 0; i < this.additionalData.length; i++) {
275277
const cartAttr = this.additionalData[i];
276278
this.currentCart.additionalData[cartAttr] = data[cartAttr];

0 commit comments

Comments
 (0)