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) {