Wishlist extension for Spree Commerce.
Last updated on: May 25 at 11:40 AM
source code bug trackerThe Spree Wishlist extension enables multiple wishlists per user, as well as managing those as public (sharable) and private. It also includes the ability to notify a friend via email of a recommended product.
Add the following to your Gemfile
gem 'spree_wishlist', github: 'spree-contrib/spree_wishlist', branch: 'master'
Run
bundle install
bundle exec rails g spree_wishlist:install
Please read Spree API v1 summary first.
Available endpoints:
/api/v1/wishlists
- returns a list of wishlists for signed in user/api/v1/wishlists/:id
- returns single wishlists with a list of Products (Variants)/api/v1/wishlists
- creates a new wishlistpayload:
wishlist: {
"name": "fathers day"
}
/api/v1/wishlists/:id
payload:
wishlist: {
"name": "new name"
}
/api/v1/wishlists/:id
/api/v1/wished_products
- adds Product (Variant) to a Wishlistpayload:
wished_product: {
"variant_id": 2,
"wishlist_id": 1
}
/api/v1/wished_products/:id
payload:
wished_product: {
"variant_id": 3,
"wishlist_id": 2
}
/api/v1/wished_products/:id
GET /api/v2/storefront/wishlists
- returns a list of wishlists for signed in user
GET /api/v2/storefront/wishlists/:access_hash
- returns single wishlists with a list of Products (Variants)
payload:
{ "include": "wished_products.variant" }
/api/v2/storefront/wishlists/:access_hash
payload:
wishlist: {
"name": "Wishlist name",
"is_default": true,
"is_private": true,
}
/api/v2/storefront/wishlists
- creates a new wishlistpayload:
wishlist: {
"name": "Wishlist name",
"is_default": true,
"is_private": true,
}
/api/v2/storefront/wishlists/:access_hash
/api/v2/storefront/wishlists/:access_hash/wished_products
- adds Product (Variant) to a Wishlistpayload:
wished_product: {
"variant_id": 2,
"remark": "I want this",
"quantity": 3
}
/api/v2/storefront/wishlists/:access_hash/wished_products/:id
payload:
wished_product: {
"variant_id": 2,
"remark": "I want this",
"quantity": 4
}
/api/v2/storefront/wishlists/:access_hash/wished_products/:id
Copyright (c) 2009-2020 Spree Commerce Inc. and contributors, released under the New BSD License