{"id":19157130,"url":"https://github.com/kinduff/spree_variant_options","last_synced_at":"2026-03-01T13:36:48.906Z","repository":{"id":21124737,"uuid":"24425591","full_name":"kinduff/spree_variant_options","owner":"kinduff","description":null,"archived":false,"fork":false,"pushed_at":"2014-09-24T20:33:28.000Z","size":4760,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T21:43:40.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kinduff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-24T17:40:31.000Z","updated_at":"2021-05-15T20:04:07.000Z","dependencies_parsed_at":"2022-08-26T23:21:21.696Z","dependency_job_id":null,"html_url":"https://github.com/kinduff/spree_variant_options","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kinduff/spree_variant_options","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinduff%2Fspree_variant_options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinduff%2Fspree_variant_options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinduff%2Fspree_variant_options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinduff%2Fspree_variant_options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kinduff","download_url":"https://codeload.github.com/kinduff/spree_variant_options/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinduff%2Fspree_variant_options/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T13:32:00.443Z","status":"ssl_error","status_checked_at":"2026-03-01T13:32:00.084Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T08:38:25.925Z","updated_at":"2026-03-01T13:36:48.888Z","avatar_url":"https://github.com/kinduff.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[ ![Codeship Status for deseretbook/spree_variant_options](https://codeship.io/projects/e0401320-e04b-0131-fce5-3a1d3d24338d/status?branch=master)](https://codeship.io/projects/25125)\n\n\nSpree Variant Options is a very simple spree extension that replaces the radio-button variant selection with groups of option types and values. To get a better idea let's let a few images do the explaining.\n\n\n#### When no selection has been made:\n![Spree Variant Options - No selection](http://spree-docs.s3.amazonaws.com/spree_variant_options/v0.3.1/1.jpg)\n\n#### After \"Large\" is selected, \"Large Blue\" is out of stock:\n\n![Spree Variant Options - Option Type/Value selected](http://spree-docs.s3.amazonaws.com/spree_variant_options/v0.3.1/2.jpg)\n\n#### And after \"Green\" is selected:\n![Spree Variant Options - Variant Selcted](http://spree-docs.s3.amazonaws.com/spree_variant_options/v0.3.1/3.jpg)\n\nTo see it in action, follow the steps for \"Demo\" below.\n\n\n------------------------------------------------------------------------------\nInstallation\n------------------------------------------------------------------------------\n\nIf you don't already have an existing Spree site, [click here](https://gist.github.com/946719) then come back later... You can also read the Spree docs [here](http://spreecommerce.com/documentation/getting_started.html)...\n\nTo install Spree Variant Options, just add the following to your Gemfile:\n\n```ruby\ngem 'spree_variant_options'\n```\n\nIf you're on an older version of Spree, please reference the [Versionfile](https://github.com/citrus/spree_variant_options/blob/master/Versionfile) for your Spree version.\n\nNow, bundle up with:\n\n```bash\nbundle\n```\n\nNext, run the install generator to copy the necessary migration to your project and migrate your database:\n\n```bash\nrails g spree_variant_options:install\nrake db:migrate\n```\n\n------------------------------------------------------------------------------\nConfiguration Options\n------------------------------------------------------------------------------\n\nSpree Variant Options comes with some handy options:\n\n- allow_select_outofstock (default : false)\n  When using extension like ([spree_wishlist](https://github.com/spree/spree_wishlist)), you might want to allow your customer to add out of stock product by selecting out of stock variant options :\n  ```erb\n    \u003c%= form_for Spree::WishedProduct.new, :html =\u003e {:\"data-form-type\" =\u003e \"variant\"} do |f| %\u003e\n      \u003c%= f.hidden_field :variant_id, :value =\u003e @product.master.id %\u003e\n      \u003cbutton type=\"submit\" class=\"medium blue awesome\"\u003e\n        \u003c%= t(:add_to_wishlist) %\u003e\n      \u003c/button\u003e\n    \u003c% end %\u003e\n  ```\n  By setting allow_select_outofstock to true, when an user selects variant options it will automatically update any form's input variant_id with an data-form-type=\"variant\" attribute.\n\n- default_instock (default: false)\n  If this is option is set to true, it will automatically preselect in-stock variant options.\n\nThese configuration options can be set in a config/initializers/spree_variant_options.rb file for example :\n```ruby\nSpreeVariantOptions::VariantConfig.allow_select_outofstock = true\nSpreeVariantOptions::VariantConfig.default_instock = true\n```\n\n### Storage options\nLike in spree core there is support for storage of images on S3.\nStorage on S3 is enabled with the same configuration as in spree core.\n\nExample: config/initializers/spree.rb\n\n```ruby\nSpree.config do |config|\n  config.use_s3 = true\n  config.s3_bucket = \u003cbucket_name\u003e\n  config.s3_access_key = \u003caws_access_key\u003e\n  config.s3_secret = \u003caws_secret_key\u003e\nend\n```\n\n------------------------------------------------------------------------------\nVersions\n------------------------------------------------------------------------------\n\nSpree Variant Options is compatible with Spree 0.30.x through 2.0.x. Please reference `Versionfile` for more details.\n\n\n------------------------------------------------------------------------------\nTesting\n------------------------------------------------------------------------------\n\nClone this repo to where you develop, bundle up, then run `rake test_app' to get the show started:\n\n```bash\ngit clone git://github.com/citrus/spree_variant_options.git\ncd spree_variant_options\nbundle install\nbundle exec rake test_app\n\n# cucumber/capybara\nbundle exec rake cucumber\n\n# test/unit\nbundle exec rake test\n\n# both\nbundle exec rake \n```\n\nPOW!\n\n\n------------------------------------------------------------------------------\nDemo\n------------------------------------------------------------------------------\n\nYou can easily use the test/dummy app as a demo of spree_variant_options. Just `cd` to where you develop and run:\n\n```bash\ngit clone git://github.com/citrus/spree_variant_options.git\ncd spree_variant_options\nbundle install\nbundle exec rake test_app\ncd test/dummy\nrails s\n```\n\n    \n------------------------------------------------------------------------------\nContributors\n------------------------------------------------------------------------------\n\n* Spencer Steffen ([@citrus](https://github.com/citrus))\n* Stéphane Bounmy ([@sbounmy](https://github.com/sbounmy))\n* Dan Morin ([@danmorin](https://github.com/danmorin))\n* Richard Brown ([@rbrown](https://github.com/rbrown))\n* [@baracek](https://github.com/baracek)\n* [@Numerico](https://github.com/Numerico)\n\nIf you'd like to help out feel free to fork and send me pull requests!\n\n\n------------------------------------------------------------------------------\nLicense\n------------------------------------------------------------------------------\n\nCopyright (c) 2011 - 2012 Spencer Steffen and Citrus, released under the New BSD License All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinduff%2Fspree_variant_options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinduff%2Fspree_variant_options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinduff%2Fspree_variant_options/lists"}