@runwell/shopify-toolkit 0.24.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runwell-bundle-system",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "category": "catalog",
5
5
  "source": "runwell",
6
6
  "base": "bundle-system",
@@ -170,6 +170,16 @@
170
170
  {%- if t.popular -%}{%- assign has_popular = true -%}{%- endif -%}
171
171
  {%- endfor -%}
172
172
 
173
+ {%- comment -%}
174
+ Tier discount_pct is applied to compareAtPrice when present
175
+ (the MSRP), so storefronts already running a base-price sale
176
+ still yield correct bundle math. Falls back to product.price.
177
+ {%- endcomment -%}
178
+ {%- assign tier_base_price = product.selected_or_first_available_variant.compare_at_price | default: product.price -%}
179
+ {%- if tier_base_price == 0 or tier_base_price == blank -%}
180
+ {%- assign tier_base_price = product.price -%}
181
+ {%- endif -%}
182
+
173
183
  <form
174
184
  action="{{ routes.cart_add_url }}"
175
185
  method="post"
@@ -196,10 +206,10 @@
196
206
  {%- capture tier_label -%}{{ t.qty }}x {{ product.title }}{%- endcapture -%}
197
207
  {%- endif -%}
198
208
 
199
- {%- assign discount_amount = product.price | times: t.discount_pct | divided_by: 100 -%}
200
- {%- assign per_unit_price = product.price | minus: discount_amount -%}
209
+ {%- assign discount_amount = tier_base_price | times: t.discount_pct | divided_by: 100 -%}
210
+ {%- assign per_unit_price = tier_base_price | minus: discount_amount -%}
201
211
  {%- assign total_price = per_unit_price | times: t.qty -%}
202
- {%- assign full_price = product.price | times: t.qty -%}
212
+ {%- assign full_price = tier_base_price | times: t.qty -%}
203
213
  {%- assign savings = full_price | minus: total_price -%}
204
214
 
205
215
  <label
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runwell/shopify-toolkit",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "Reusable Shopify theme modules from Runwell. Replaces typically app-driven features (reviews, wishlist, urgency, FAQ, post-purchase upsell, exit popups, free-ship progress, sticky ATC, testimonials, badges, bundles) with native Liquid + JS + CSS that ship across multiple client themes via a config-driven sync CLI.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",