Giter VIP home page Giter VIP logo

spree-dropdown-variants's Introduction

Spree Dropdown Variants

This is a Spree extension that renders variants as dropdowns instead of the default radio buttons.

What it does

  1. On product/show renders an HTML select control for each option type assigned to the product.
  2. Option values for the select include all option values for permutations of variants that exist. It will exclude option values if not variants for that value are in stock. For example if you have option values ('Small', 'Medium', 'Large'), but no variants with 'Medium' in stock, medium will not be rendered.
  3. If a selection of option values is made for which that combination of option values either does not exist as a variant or that variant is out of stock, a validation error on order is added.

Overrides to be aware of

  1. The view partial 'products/_cartform' is partially overridden through hook :inside_product_cart_form

Construction

  1. Tried to make it as minimally invasive as possible.
  2. Tried to avoid overrides and only use extensions.
  3. All helper, model, and controller extensions are RSpec'd.

spree-dropdown-variants's People

Contributors

timcase avatar

Watchers

Marco Crepaldi avatar James Cloos 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.