@gomusdev/web-components 4.14.0 → 4.14.2

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.
package/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.14.2 (2026-08-04)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **checkout:** allow overriding the checkoutSuccess url via go.config urls
8
+
9
+ ## 4.14.1 (2026-08-03)
10
+
11
+ ### Bug Fixes
12
+
13
+ * **cart:** render backend-discounted prices for dynamic-priced timeslot tickets
14
+
3
15
  ## 4.14.0 (2026-08-03)
4
16
 
5
17
  ### Features
@@ -15400,13 +15400,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15400
15400
  }
15401
15401
  function createDisplayCartItem(cartItem, attrs) {
15402
15402
  const quantity = isUITour(cartItem.product) ? 1 : resolveApiQuantity(attrs);
15403
- const originalPrice = cartItem.product.price_cents;
15404
- const displayPrice = originalPrice === 0 ? 0 : attrs.price_cents ?? originalPrice;
15403
+ const originalPrice = cartItem.price_cents;
15404
+ const displayPrice = cartItem.product.price_cents === 0 ? 0 : attrs.price_cents ?? originalPrice;
15405
15405
  const discounted = displayPrice < originalPrice;
15406
- return createCartItem({
15406
+ const product = {
15407
15407
  ...cartItem.product,
15408
15408
  price_cents: displayPrice
15409
- }, {
15409
+ };
15410
+ if ("dynamic_prices" in product) product.dynamic_prices = null;
15411
+ return createCartItem(product, {
15410
15412
  quantity,
15411
15413
  time: cartItem.time,
15412
15414
  voucher: cartItem.voucher,
@@ -18665,8 +18667,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18665
18667
  if (beforeSubmit) await beforeSubmit(form.details.formData);
18666
18668
  const meta = checkout.data.meta;
18667
18669
  const navigateTo = configStore.config.navigateTo;
18668
- if (meta.status === "success") navigateTo?.(shop.urls.checkoutSuccess(checkout.data.order.token));
18669
- else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
18670
+ if (meta.status === "success") {
18671
+ const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
18672
+ navigateTo?.(checkoutSuccess(checkout.data.order.token));
18673
+ } else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
18670
18674
  else if (meta.payment_url) navigateTo?.(meta.payment_url);
18671
18675
  else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
18672
18676
  else navigateTo?.(shop.urls.checkoutFailure(""));
@@ -15399,13 +15399,15 @@ function createDisplayCart(baseCart, apiItems) {
15399
15399
  }
15400
15400
  function createDisplayCartItem(cartItem, attrs) {
15401
15401
  const quantity = isUITour(cartItem.product) ? 1 : resolveApiQuantity(attrs);
15402
- const originalPrice = cartItem.product.price_cents;
15403
- const displayPrice = originalPrice === 0 ? 0 : attrs.price_cents ?? originalPrice;
15402
+ const originalPrice = cartItem.price_cents;
15403
+ const displayPrice = cartItem.product.price_cents === 0 ? 0 : attrs.price_cents ?? originalPrice;
15404
15404
  const discounted = displayPrice < originalPrice;
15405
- return createCartItem({
15405
+ const product = {
15406
15406
  ...cartItem.product,
15407
15407
  price_cents: displayPrice
15408
- }, {
15408
+ };
15409
+ if ("dynamic_prices" in product) product.dynamic_prices = null;
15410
+ return createCartItem(product, {
15409
15411
  quantity,
15410
15412
  time: cartItem.time,
15411
15413
  voucher: cartItem.voucher,
@@ -18664,8 +18666,10 @@ async function finalizeCheckout(form, formId) {
18664
18666
  if (beforeSubmit) await beforeSubmit(form.details.formData);
18665
18667
  const meta = checkout.data.meta;
18666
18668
  const navigateTo = configStore.config.navigateTo;
18667
- if (meta.status === "success") navigateTo?.(shop.urls.checkoutSuccess(checkout.data.order.token));
18668
- else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
18669
+ if (meta.status === "success") {
18670
+ const checkoutSuccess = configStore.config.urls.checkoutSuccess ?? shop.urls.checkoutSuccess;
18671
+ navigateTo?.(checkoutSuccess(checkout.data.order.token));
18672
+ } else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
18669
18673
  else if (meta.payment_url) navigateTo?.(meta.payment_url);
18670
18674
  else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
18671
18675
  else navigateTo?.(shop.urls.checkoutFailure(""));