Skip to content

Commit d812900

Browse files
authored
Merge pull request #447 from Shopify/tweak-cart-transform-example
Updated comment on update operation example
2 parents bfe8829 + 114b4e8 commit d812900

File tree

1 file changed

+4
-5
lines changed
  • sample-apps/update-line-item/extensions/update-line-item-js/src

1 file changed

+4
-5
lines changed

sample-apps/update-line-item/extensions/update-line-item-js/src/run.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// @ts-check
22

33
/*
4-
A straightforward example of a function that expands a bundle into its component parts.
5-
The parts of a bundle are stored in a metafield on the product parent value with a specific format,
6-
specifying each part's quantity and variant.
4+
A straightforward example of a function that updates a line item title and price based on attributes.
75
8-
The function reads the cart. Any item containing the metafield that specifies the bundle parts
9-
will return an Expand operation containing the parts.
6+
The function reads the cart. Any item with a specific line item attribute will be used
7+
to generate an update operation with a custom title, and price based on simple math using
8+
the line item attribute value.
109
*/
1110

1211
/**

0 commit comments

Comments
 (0)