From 42ca0a5b163f8de657e9180ef0e3837a2ba5f2d8 Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Thu, 21 May 2026 15:14:41 +0800 Subject: [PATCH 1/6] Refs #36608: Production Time - add localization phrases --- resource/i18n/en-US.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resource/i18n/en-US.csv b/resource/i18n/en-US.csv index b79be7fa2..e5cfb1415 100644 --- a/resource/i18n/en-US.csv +++ b/resource/i18n/en-US.csv @@ -1,5 +1,6 @@ " is out of stock!"," is out of stock!" "'Size'","'Size'" +"1 rush slot left","1 rush slot left" "10% discount on 10+ Petsies","10% discount on 10+ Petsies" "20% discount on 20+ Petsies","20% discount on 20+ Petsies" "404 Page Not Found","404 Page Not Found" @@ -989,3 +990,4 @@ "{filesCount} images were not uploaded because the maximum number of images reached","{filesCount} images were not uploaded because the maximum number of images reached" "{name} Homepage","{name} Homepage" "{name} gift card template","{name} gift card template" +"{slotsLeft} rush slots left","{slotsLeft} rush slots left" From 9e580d59dabf3ecf2f87f90ede7e81de68cff79d Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Mon, 6 Jul 2026 16:23:31 +0800 Subject: [PATCH 2/6] Refs #36797: Production Time Customization - redesign widget --- assets/rush-upgrades/rush.svg | 4 + assets/rush-upgrades/standard.svg | 4 + assets/rush-upgrades/super-rush.svg | 4 + .../customization-option.vue | 5 +- .../production-time-option-card.vue | 374 +++++++++++++++ ...duction-time-option-card-data.interface.ts | 8 + .../widgets/timeline-list-widget.vue | 437 ++++++++++++++++++ helpers/use-alteration-products-loader.ts | 17 - ...se-order-item-alteration-product-loader.ts | 5 - resource/i18n/en-US.csv | 8 + 10 files changed, 843 insertions(+), 23 deletions(-) create mode 100644 assets/rush-upgrades/rush.svg create mode 100644 assets/rush-upgrades/standard.svg create mode 100644 assets/rush-upgrades/super-rush.svg create mode 100644 components/customization-system/production-time-option-card.vue create mode 100644 components/customization-system/types/production-time-option-card-data.interface.ts create mode 100644 components/customization-system/widgets/timeline-list-widget.vue diff --git a/assets/rush-upgrades/rush.svg b/assets/rush-upgrades/rush.svg new file mode 100644 index 000000000..e5ac2ce2e --- /dev/null +++ b/assets/rush-upgrades/rush.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/rush-upgrades/standard.svg b/assets/rush-upgrades/standard.svg new file mode 100644 index 000000000..3cf818fa0 --- /dev/null +++ b/assets/rush-upgrades/standard.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assets/rush-upgrades/super-rush.svg b/assets/rush-upgrades/super-rush.svg new file mode 100644 index 000000000..12bc52789 --- /dev/null +++ b/assets/rush-upgrades/super-rush.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/components/customization-system/customization-option.vue b/components/customization-system/customization-option.vue index 5e19ce525..5435aafc5 100644 --- a/components/customization-system/customization-option.vue +++ b/components/customization-system/customization-option.vue @@ -85,6 +85,7 @@ import SearchFieldWidget from './widgets/search-field-widget.vue'; import TextAreaWidget from './widgets/textarea-widget.vue'; import TextInputWidget from './widgets/text-input-widget.vue'; import ThumbnailsListWidget from './widgets/thumbnails-list-widget.vue'; +import TimelineListWidget from './widgets/timeline-list-widget.vue'; type WidgetComponent = InstanceType | InstanceType | @@ -94,7 +95,8 @@ InstanceType | InstanceType | InstanceType | InstanceType | -InstanceType; +InstanceType | +InstanceType; const customizationWidgetBusyStateChangedEventName = 'customization-option-busy-state-changed'; @@ -111,6 +113,7 @@ export default defineComponent({ TextAreaWidget, TextInputWidget, ThumbnailsListWidget, + TimelineListWidget, ValidationProvider }, props: { diff --git a/components/customization-system/production-time-option-card.vue b/components/customization-system/production-time-option-card.vue new file mode 100644 index 000000000..7719761dd --- /dev/null +++ b/components/customization-system/production-time-option-card.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/components/customization-system/types/production-time-option-card-data.interface.ts b/components/customization-system/types/production-time-option-card-data.interface.ts new file mode 100644 index 000000000..0375dedbe --- /dev/null +++ b/components/customization-system/types/production-time-option-card-data.interface.ts @@ -0,0 +1,8 @@ +import { PriceHelper } from '@vue-storefront/core/helpers'; + +export interface ProductionTimeOptionCardData { + optionName: string, + price: PriceHelper.ProductPrice, + slotsLeft: number, + turnaroundTime: number +} diff --git a/components/customization-system/widgets/timeline-list-widget.vue b/components/customization-system/widgets/timeline-list-widget.vue new file mode 100644 index 000000000..5e065ff69 --- /dev/null +++ b/components/customization-system/widgets/timeline-list-widget.vue @@ -0,0 +1,437 @@ + + + + + diff --git a/helpers/use-alteration-products-loader.ts b/helpers/use-alteration-products-loader.ts index 9ac0eb345..a5e3cc2a6 100644 --- a/helpers/use-alteration-products-loader.ts +++ b/helpers/use-alteration-products-loader.ts @@ -32,20 +32,6 @@ export function useAlterationProductsLoader ( return items; }); - const orderItemIdToShippingCountryId = computed>(() => { - const mapping: Record = {}; - - for (const order of orders.value) { - const shippingCountryId = order.shipping_address?.country_id; - - for (const item of order.items) { - mapping[item.item_id] = shippingCountryId; - } - } - - return mapping; - }); - const alterationProductSkus = computed(() => { const skus = new Set(); @@ -85,13 +71,10 @@ export function useAlterationProductsLoader ( continue; } - const shippingCountryId = orderItemIdToShippingCountryId.value[orderItem.item_id]; - const updatedProduct = updateProductProductionTimeCustomizationData( product, root.$store, { - shippingCountryId, makeProductionTimeRequired: false } ); diff --git a/helpers/use-order-item-alteration-product-loader.ts b/helpers/use-order-item-alteration-product-loader.ts index 667a41634..55b0ec9de 100644 --- a/helpers/use-order-item-alteration-product-loader.ts +++ b/helpers/use-order-item-alteration-product-loader.ts @@ -33,10 +33,6 @@ export function useOrderItemAlterationProductLoader ( return orderItem.value.extension_attributes?.alteration_product?.sku; }); - const shippingCountryId = computed(() => { - return order.value?.shipping_address?.country_id; - }); - const productBySkuDictionary = computed>(() => { return root.$store.getters['product/getProductBySkuDictionary'] || {}; }); @@ -58,7 +54,6 @@ export function useOrderItemAlterationProductLoader ( product, root.$store, { - shippingCountryId: shippingCountryId.value, makeProductionTimeRequired: false } ); diff --git a/resource/i18n/en-US.csv b/resource/i18n/en-US.csv index b81c34f28..dd5dc9afd 100644 --- a/resource/i18n/en-US.csv +++ b/resource/i18n/en-US.csv @@ -43,6 +43,7 @@ "All quantity discounts applied automatically at checkout:","All quantity discounts applied automatically at checkout:" "Allow notification about the order","Allow notification about the order" "Allow order notifications","Allow order notifications" +"Always Available","Always Available" "Amount","Amount" "An error occured while loading the component.","An error occured while loading the component." "Another coupon is already applied.","Another coupon is already applied." @@ -283,6 +284,7 @@ "Forgot the password?","Forgot the password?" "Forgotten password?","Forgotten password?" "Form components","Form components" +"Free","Free" "Full rewards program benefits","Full rewards program benefits" "Fur Color","Fur Color" "General agreement","General agreement" @@ -450,6 +452,8 @@ "Notify Customer Support","Notify Customer Support" "Now you can get a custom plush lookalike of your pet from @PetsiesOfficial. Check it out! https://t.co/YxtXW7CYJQ","Now you can get a custom plush lookalike of your pet from @PetsiesOfficial. Check it out! https://t.co/YxtXW7CYJQ" "OK","OK" +"Only 1 slot left","Only 1 slot left" +"Only {slotsLeft} slots left","Only {slotsLeft} slots left" "Open Cart","Open Cart" "Open menu","Open menu" "Open microcart","Open microcart" @@ -691,6 +695,7 @@ "Shipping method","Shipping method" "Shipping","Shipping" "Ships in approx. {weeks} weeks","Ships in approx. {weeks} weeks" +"Ships {date}","Ships {date}" "Shopping Cart","Shopping Cart" "Shopping cart is empty. Please add some products before entering Checkout","Shopping cart is empty. Please add some products before entering Checkout" "Shopping cart","Shopping cart" @@ -710,6 +715,7 @@ "Skip to download","Skip to download" "Social","Social" "Socks","Socks" +"Sold out","Sold out" "Some fields are invalid","Some fields are invalid" "Some of the ordered products are not available!","Some of the ordered products are not available!" "Some products you've ordered are out of stock. Your order has been canceled.","Some products you've ordered are out of stock. Your order has been canceled." @@ -1011,4 +1017,6 @@ "{filesCount} images were not uploaded because the maximum number of images reached","{filesCount} images were not uploaded because the maximum number of images reached" "{name} Homepage","{name} Homepage" "{name} gift card template","{name} gift card template" +"{optionName} - 1 week","{optionName} - 1 week" +"{optionName} - {weeks} weeks","{optionName} - {weeks} weeks" "{slotsLeft} rush slots left","{slotsLeft} rush slots left" From 11a10a2f96ba1923ced6ddeb31bdd33c8495e423 Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Mon, 6 Jul 2026 16:41:40 +0800 Subject: [PATCH 3/6] Refs #36797: Production Time Customization - add 'fastest available' badge --- .../production-time-option-card.vue | 34 +++++++++++++++++++ .../widgets/timeline-list-widget.vue | 31 ++++++++++++++--- resource/i18n/en-US.csv | 1 + 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/components/customization-system/production-time-option-card.vue b/components/customization-system/production-time-option-card.vue index 7719761dd..8503ba898 100644 --- a/components/customization-system/production-time-option-card.vue +++ b/components/customization-system/production-time-option-card.vue @@ -10,6 +10,10 @@ + + {{ fastestAvailableTitle }} + +