Skip to content

Commit

Permalink
Merge pull request bagisto#10524 from amit-webkul/grouped
Browse files Browse the repository at this point in the history
🔨 [v2.2] : fix Issue bagisto#10513
  • Loading branch information
devansh-webkul authored Feb 3, 2025
2 parents ba24035 + e0a4707 commit 188a2db
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
27 changes: 23 additions & 4 deletions packages/Webkul/Shop/src/Resources/views/products/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class="container mt-[60px] !p-0"
download="{{ $customAttributeValue['label'] }}"
>
<img
class="min-h-5 min-w-5 h-5 w-5"
class="h-5 min-h-5 w-5 min-w-5"
src="{{ Storage::url($customAttributeValue['value']) }}"
/>
</a>
Expand Down Expand Up @@ -212,8 +212,8 @@ class="max-md:border-none"
href="{{ Storage::url($product[$customAttributeValue['code']]) }}"
download="{{ $customAttributeValue['label'] }}"
>
<img
class="min-h-5 min-w-5 h-5 w-5"
<img
class="h-5 min-h-5 w-5 min-w-5"
src="{{ Storage::url($customAttributeValue['value']) }}"
alt="Product Image"
/>
Expand Down Expand Up @@ -308,7 +308,7 @@ class="bg-gray-100 max-md:!py-3 max-sm:!py-2"
@if (core()->getConfigData('customer.settings.wishlist.wishlist_option'))
<div
class="max-sm:min-h-7 max-sm:min-w-7 flex max-h-[46px] min-h-[46px] min-w-[46px] cursor-pointer items-center justify-center rounded-full border bg-white text-2xl transition-all hover:opacity-[0.8] max-sm:max-h-7 max-sm:text-base"
class="flex max-h-[46px] min-h-[46px] min-w-[46px] cursor-pointer items-center justify-center rounded-full border bg-white text-2xl transition-all hover:opacity-[0.8] max-sm:max-h-7 max-sm:min-h-7 max-sm:min-w-7 max-sm:text-base"
role="button"
aria-label="@lang('shop::app.products.view.add-to-wishlist')"
tabindex="0"
Expand Down Expand Up @@ -592,6 +592,25 @@ class="icon-compare text-2xl"
}
},
updateQty(quantity, id) {
this.isLoading = true;
let qty = {};
qty[id] = quantity;
this.$axios.put('{{ route('shop.api.checkout.cart.update') }}', { qty })
.then(response => {
if (response.data.message) {
this.cart = response.data.data;
} else {
this.$emitter.emit('add-flash', { type: 'warning', message: response.data.data.message });
}
this.isLoading = false;
}).catch(error => this.isLoading = false);
},
getCompareItemsStorageKey() {
return 'compare_items';
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
name="qty[{{$groupedProduct->associated_product_id}}]"
:value="$groupedProduct->qty"
class="gap-x-4 rounded-xl px-3 py-2.5 max-sm:!py-1.5"
@change="updateItem($event)"
@change="updateQty($event, {{ $groupedProduct->associated_product_id }})"
/>
</div>
@endif
Expand Down

0 comments on commit 188a2db

Please sign in to comment.