rapidez / guest-wishlist
Rapidez Guest Wishlist
Installs: 51
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 0
Language:Blade
Requires
- php: ^8.0|^8.1
- illuminate/support: ^9.0|^10.0|^11.0
- illuminate/view: ^9.0|^10.0|^11.0
- rapidez/core: ~1.0|^2.0
This package is auto-updated.
Last update: 2024-12-16 10:02:22 UTC
README
Wishlist for guests where product SKU's will be stored in local storage. There is no cart merging when logging in!
Installation
composer require rapidez/guest-wishlist
The wishlist can be found at /wishlist
Product page
To add a wishlist toggle button on the product page just include the button view and specify where the sku can be found as Javascript variable in: resources/views/vendor/rapidez/product/overview.blade.php
@include('rapidez-guestwishlist::button', ['sku' => 'config.product.sku'])
Product listing
The same for the product listing resources/views/vendor/rapidez/listing/partials/item.blade.php
@include('rapidez-guestwishlist::button', ['sku' => 'item.sku'])
Wishlist count
If you'd like to display a wishlist button with a count (for example in the header) you can use this:
<wishlist>
<a href="/wishlist" slot-scope="{ wishlist }">
<span v-cloak v-if="wishlist.length">@{{ wishlist.length }}</span>
<span v-else>0</span>
</a>
</wishlist>
Views
You can publish the views with:
php artisan vendor:publish --provider="Rapidez\GuestWishlist\GuestWishlistServiceProvider" --tag=views
License
GNU General Public License v3. Please see License File for more information.