Skip to content

Commit

Permalink
Fix the disabled options to work if there's only one super attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 committed Jan 8, 2025
1 parent 62b4b9a commit 6e3bc7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/js/components/Product/AddToCart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ export default {
}
if (!option.in_stock) {
if (Object.keys(this.product.super_attributes).length === 1) {
disabledOptions['super_' + attribute.code].push(option[attribute.code]);
}
return
}
Expand Down

0 comments on commit 6e3bc7f

Please sign in to comment.