I have confiugurable product with several simple products. Options of that products are two distinct sets. So one product completely excludes ability to reach other by selecting options. For example:
the first simple product have color - blue and size - S, the second color - red and size: M. In this case, I will not be able to click the second product, and buy it.
I think in this case it would be useful to be able to enter the product page without pre-selected options
Create configurable product with two simple products in which options will be from two disjoint sets
Pick one option.
develop branch and create Pull Request 2. Feature / Improvement back to develop.release branch and create Pull Request 3. Stabilisation fix back to release.hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.hey, why you are not able to select other option? it's not displayed on product page?
They are displayed, and disabled by isOptionAvailable function, because that options from distinct set
it may related with https://github.com/DivanteLtd/vue-storefront/issues/4831
@gibkigonzo kinda related but not directly... the issue that @dmytrokravch is talking about results from a different reason...
i believe the problem comes from this line in Product.vue:
async changeFilter (variant) {
const selectedConfiguration = Object.assign({ attribute_code: variant.type }, variant)
await filterChangedProduct(selectedConfiguration, this.$store, this.$router)
this.getQuantity()
},
filterChangedProduct always merges the current config: core\modules\catalog\events.ts in line 27
const currentProductConfiguration = store.getters['product/getCurrentProductConfiguration']
const changedConfig = Object.assign({}, currentProductConfiguration, { [filterOption.attribute_code]: filterOption })
therefore if the new selected option doesnt share the other configurable attribute it will never find a correct child....
what i did to "fix" this was change the changeFilter to this:
async changeFilter (variant) {
const selectedConfiguration = Object.assign({ attribute_code: variant.type }, variant)
// Remove all other configurations in order to chose possible variation with new selected
if (variant.type === 'material') this.$store.commit('product/product/SET_CURRENT_CONFIGURATION', {})
await filterChangedProduct(selectedConfiguration, this.$store, this.$router)
}
maybe this will help...
nice @simonmaass So maybe we should pass some options as last argument to disable merging configuration 馃 wdyt @Fifciu ?
await filterChangedProduct(selectedConfiguration, this.$store, this.$router, { merge: false })
Sounds cool for me @gibkibonzo
Most helpful comment
nice @simonmaass So maybe we should pass some options as last argument to disable merging configuration 馃 wdyt @Fifciu ?
await filterChangedProduct(selectedConfiguration, this.$store, this.$router, { merge: false })