From 6cd6b94af9e8c9b93664cd55b233c4cfe4ea23fe Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Fri, 12 Feb 2021 17:53:17 +0530 Subject: [PATCH] Extra Usage Checks For The Support --- packages/Webkul/API/Http/Resources/Catalog/Product.php | 2 +- .../Shop/src/Resources/views/products/view/gallery.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/API/Http/Resources/Catalog/Product.php b/packages/Webkul/API/Http/Resources/Catalog/Product.php index cc1bbc18d..ef7e1ed74 100644 --- a/packages/Webkul/API/Http/Resources/Catalog/Product.php +++ b/packages/Webkul/API/Http/Resources/Catalog/Product.php @@ -61,7 +61,7 @@ class Product extends JsonResource /* product's checks */ 'in_stock' => $product->haveSufficientQuantity(1), 'is_saved' => false, - 'is_wishlisted' => $this->wishlistHelper->getWishlistProduct($product), + 'is_wishlisted' => $this->wishlistHelper->getWishlistProduct($product) ? true : false, 'is_item_in_cart' => \Cart::hasProduct($product), 'show_quantity_changer' => $this->when( $product->type !== 'grouped', diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php index b87eb34d7..39a5c0c0b 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php @@ -194,7 +194,7 @@ $('img#pro-img').data('zoom-image', $('img#pro-img').data('image')).ezPlus(); } - var wishlist = " getWishlistProduct($product); ?> "; + var wishlist = "{{ $wishListHelper->getWishlistProduct($product) ? 'true' : 'false' }}"; $(document).mousemove(function(event) { if ($('.add-to-wishlist').length || wishlist != 0) {