Skip to content

Commit

Permalink
fix(vue-demo): variants displaying (#1677)
Browse files Browse the repository at this point in the history
* fix(vue-demo): variants displaying

* feat: changes after cr
  • Loading branch information
mdanilowicz authored Feb 12, 2025
1 parent 7324620 commit d663627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-spies-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shopware/cms-base-layer": patch
---

Fix displaying product variants on the product page
9 changes: 3 additions & 6 deletions packages/cms-base-layer/components/SwVariantConfigurator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ const isOptionSelected = (optionId: string) =>
const onHandleChange = async () => {
isLoading.value = true;
const variantFound = await findVariantForSelectedOptions(
unref(selectedOptions),
);
const variantFound = await findVariantForSelectedOptions();
const selectedOptionsVariantPath = buildUrlPrefix(
getProductRoute(variantFound),
prefix,
Expand Down Expand Up @@ -107,13 +104,13 @@ const onHandleChange = async () => {
:class="{
'border-3 border-indigo-600': isOptionSelected(option.id),
}"
@click="handleChange(optionGroup.name, option.id, onHandleChange)"
@click="handleChange(optionGroup.translated.name, option.id, onHandleChange)"
>
<p
:id="`${option.id}-choice-label`"
data-testid="product-variant-text"
>
{{ option.name }}
{{ option.translated.name }}
</p>
</label>
</div>
Expand Down

0 comments on commit d663627

Please sign in to comment.