Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ts cart transform #276

Open
wants to merge 3 commits into
base: rename-cart-transform-example
Choose a base branch
from

Conversation

lhoffbeck
Copy link
Contributor

@lhoffbeck lhoffbeck commented Jul 5, 2023

Added a basic example for CartTransfrom written in TS.

  • Example returns Expand operations based on 2 metafields:
    1 - bundles. component_references -> List.productVariant metafield referencing bundle components
    2 - bundles. component_quantities -> List.Integer metafield with component quantities
  • For example, the bundle Skincare kit will store in the bundle metafield: "2 creams, one face mask"; if the item Skincare kit is added to the cart, the function will return an Expand operation.

Demo video
Demo product -> black variant (PW gaicru)

@lhoffbeck lhoffbeck changed the base branch from main to rename-cart-transform-example July 5, 2023 15:49
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickwesselman is it good practice to add tests here or can we ✂️ ?

@nickwesselman
Copy link
Contributor

I will say that in general, we've been avoiding TS examples and sticking to JS and Rust in order to cut down on maintenance. JS is close enough to provide TS developers what they need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants