-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 price per item to Quick Order List #2792
Conversation
@@ -299,3 +364,17 @@ | |||
{% # theme-check-enable %} | |||
</td> | |||
</tr> | |||
|
|||
<volume-pricing class="hidden" id="Volume-{{ variant.id }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get the volume pricing, I had to create a hidden volume pricing element to access it and make it hidden
But maybe we can look into an API later
{%- liquid | ||
assign volume_pricing_array = variant.quantity_price_breaks | sort: 'price' | ||
-%} | ||
<price-per-item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on making this a snippet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we will do it but maybe in a quieter time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still testing, but noticed this so far.
Also, we should probably rebase and fix the conflict.
fe762a3
to
b909e43
Compare
Co-authored-by: Kai <KaichenWang@users.noreply.github.com>
901c49e
to
aff4c08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works good.
Don't think this was introduced in this PR, but adding to cart and then adjusting quantity in Quick order list causes an error. I checked and it seems on cart update, the HTML in the DOM for Quick order errors is replaced with the same element, but with an incorrect id. Quickest fix was just to move the element in Liquid - #2798 screencast.2023-07-07.17-20-11.mp4 |
* Add variant list price * Fix price logic * Change min to step after rebase * Update assets/variant-list.js Co-authored-by: Kai <KaichenWang@users.noreply.github.com> * Update assets/component-volume-pricing.css Co-authored-by: Kai <KaichenWang@users.noreply.github.com> * Update assets/price-per-item.js Co-authored-by: Kai <KaichenWang@users.noreply.github.com> * Add missing part after rebase --------- Co-authored-by: Sofia Matulis <sofia.matulis@shopify.com> Co-authored-by: Kai <KaichenWang@users.noreply.github.com>
PR Summary:
Add variant list price change to the variant List section when there is volume pricing
Approach
I am re-using the price per item from Vol Pricing. I had to make some changes to ensure it works for variant list
Demo links
Editor