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 support to "bundles" #64

Merged
merged 24 commits into from
May 31, 2024
Merged

Add support to "bundles" #64

merged 24 commits into from
May 31, 2024

Conversation

marcomontalbano
Copy link
Member

@marcomontalbano marcomontalbano commented Apr 9, 2024

What I did

I added an attribute kind to the cl-add-to-cart, cl-price, and cl-availability components.

This new attribute indicates whether the code attribute refers to an sku or a bundle (default to sku).

Important

This feature is not fully implement on the cl-availability component. When kind is equal to bundle no information will be displayed and the component will be rendered as an empty box without any size.

cl-price

<cl-price kind="bundle" code="CLGETTINGSTARTED">
  <cl-price-amount type="compare-at"></cl-price-amount>
  <cl-price-amount type="price"></cl-price-amount>
</cl-price>

cl-add-to-cart

<cl-add-to-cart kind="bundle" code="CLGETTINGSTARTED" quantity="2">
  Add to cart
</cl-add-to-cart>

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

Copy link

netlify bot commented May 30, 2024

Deploy Preview for commercelayer-drop-in-js ready!

Name Link
🔨 Latest commit ea39f9a
🔍 Latest deploy log https://app.netlify.com/sites/commercelayer-drop-in-js/deploys/665883275c43e60008197baf
😎 Deploy Preview https://deploy-preview-64--commercelayer-drop-in-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marcomontalbano marcomontalbano marked this pull request as ready for review May 30, 2024 09:47
@marcomontalbano marcomontalbano merged commit d766504 into main May 31, 2024
6 checks passed
@marcomontalbano marcomontalbano deleted the poc-bundles branch May 31, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants