-
NEW {{ option.title }}
+
{{ option.title }}
Date: Tue, 20 Nov 2018 18:28:50 +0100
Subject: [PATCH 3/4] set default quantity from defaultOption
---
core/modules/catalog/components/ProductBundleOption.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/modules/catalog/components/ProductBundleOption.ts b/core/modules/catalog/components/ProductBundleOption.ts
index 265eecfb7e..173347f5f1 100644
--- a/core/modules/catalog/components/ProductBundleOption.ts
+++ b/core/modules/catalog/components/ProductBundleOption.ts
@@ -59,6 +59,7 @@ export const ProductBundleOption = {
if(this.option.product_links) {
const defaultOption = this.option.product_links.find(pl => { return pl.is_default })
this.productOptionId = defaultOption ? defaultOption.id : this.option.product_links[0].id
+ this.quantity = defaultOption ? defaultOption.qty : 1
}
},
bundleOptionChanged() {
From c713ebaeb01e6c43a34ff4e875603aa44002ea86 Mon Sep 17 00:00:00 2001
From: patzick
Date: Wed, 21 Nov 2018 22:45:49 +0100
Subject: [PATCH 4/4] Add product bundle validation message to translation file
---
core/i18n/resource/i18n/en-US.csv | 1 +
core/modules/catalog/components/ProductBundleOptions.ts | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/i18n/resource/i18n/en-US.csv b/core/i18n/resource/i18n/en-US.csv
index 9aa8024835..ef64b3fa1c 100644
--- a/core/i18n/resource/i18n/en-US.csv
+++ b/core/i18n/resource/i18n/en-US.csv
@@ -65,3 +65,4 @@
"to account","to account"
"Are you sure you would like to remove this item from the shopping cart?","Are you sure you would like to remove this item from the shopping cart?"
"The product or category is not available in Offline mode. Redirecting to Home.","The product or category is not available in Offline mode. Redirecting to Home."
+"Please configure product bundle options and fix the validation errors","Please configure product bundle options and fix the validation errors"
diff --git a/core/modules/catalog/components/ProductBundleOptions.ts b/core/modules/catalog/components/ProductBundleOptions.ts
index 8298c95970..a508193b97 100644
--- a/core/modules/catalog/components/ProductBundleOptions.ts
+++ b/core/modules/catalog/components/ProductBundleOptions.ts
@@ -90,7 +90,7 @@ export const ProductBundleOptions = {
if(optionValidationResult.error) validationResult = optionValidationResult
this.$set(this.validationResults, fieldName, validationResult)
if (validationResult.error) {
- this.product.errors['bundle_options_' + fieldName] = i18n.t('Please configure product custom options and fix the validation errors')
+ this.product.errors['bundle_options_' + fieldName] = i18n.t('Please configure product bundle options and fix the validation errors')
result = false
} else {
this.product.errors['bundle_options_' + fieldName] = null