Coder Social home page Coder Social logo

btolarz / spree_wishlist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spree-contrib/spree_wishlist

0.0 0.0 0.0 362 KB

Wishlist extension for Spree Commerce.

Home Page: http://guides.spreecommerce.org

License: BSD 3-Clause "New" or "Revised" License

Ruby 90.55% JavaScript 1.24% CSS 0.07% HTML 7.99% SCSS 0.15%

spree_wishlist's Introduction

Spree Wishlist

Build Status Code Climate

The 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.


Installation

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

API endpoints

Please read Spree API v1 summary first.

Available endpoints:

Wishlists management

  • GET /api/v1/wishlists - returns a list of wishlists for signed in user

  • GET /api/v1/wishlists/:id - returns single wishlists with a list of Products (Variants)

  • POST /api/v1/wishlists - creates a new wishlist

    payload:

    wishlist: {
      "name": "fathers day"
    }
  • PATCH /api/v1/wishlists/:id

    payload:

    wishlist: {
      "name": "new name"
    }
  • DELETE /api/v1/wishlists/:id

Wishlists products management

  • POST /api/v1/wished_products - adds Product (Variant) to a Wishlist

    payload:

    wished_product: {
      "variant_id": 2,
      "wishlist_id": 1
    }
  • PATCH /api/v1/wished_products/:id

    payload:

    wished_product: {
      "variant_id": 3,
      "wishlist_id": 2
    }
  • DELETE /api/v1/wished_products/:id


Wishlists V2

Wishlists management

  • 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" }
  • PATCH /api/v2/storefront/wishlists/:access_hash

    payload:

    wishlist: {
        "name": "Wishlist name",
        "is_default": true,
        "is_private": true,
      }
  • POST /api/v2/storefront/wishlists - creates a new wishlist

    payload:

      wishlist: {
          "name": "Wishlist name",
          "is_default": true,
          "is_private": true,
        }
  • DELETE /api/v2/storefront/wishlists/:access_hash

Wishlists products management

  • POST /api/v2/storefront/wishlists/:access_hash/wished_products - adds Product (Variant) to a Wishlist

    payload:

    wished_product: {
      "variant_id": 2,
      "remark": "I want this",
      "quantity": 3
    }
  • PATCH /api/v2/storefront/wishlists/:access_hash/wished_products/:id

    payload:

    wished_product: {
      "variant_id": 2,
      "remark": "I want this",
      "quantity": 4
    }
  • DELETE /api/v2/storefront/wishlists/:access_hash/wished_products/:id


Contributing

See corresponding guidelines


Copyright (c) 2009-2020 Spree Commerce Inc. and contributors, released under the New BSD License

spree_wishlist's People

Contributors

damianlegawiec avatar futhr avatar lbrapid avatar pszyszkaspark avatar stevenjenkins avatar bdq avatar jdutil avatar romul avatar bbonislawski avatar rterbush avatar gudata avatar brchristian avatar radar avatar schof avatar hates avatar jsqu99 avatar xunker avatar kascote avatar yarikesh avatar paulslaby avatar geekoncoffee avatar sushanyadav avatar salemine avatar chhlga avatar traels avatar vygovskysergey avatar fabien avatar andreabeggiato avatar divineforest avatar ssk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.