{"id":15512221,"url":"https://github.com/solidusio-contrib/solidus_volume_pricing","last_synced_at":"2025-04-22T21:42:40.354Z","repository":{"id":40545364,"uuid":"79163213","full_name":"solidusio-contrib/solidus_volume_pricing","owner":"solidusio-contrib","description":"🏪 Volume-based pricing support for your Solidus store.","archived":false,"fork":false,"pushed_at":"2024-09-25T02:57:09.000Z","size":357,"stargazers_count":15,"open_issues_count":4,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-12-20T14:33:04.439Z","etag":null,"topics":["discounts","extension","pricing","quantity","solidus","volume"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"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/solidusio-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-16T21:56:49.000Z","updated_at":"2024-05-28T08:12:09.000Z","dependencies_parsed_at":"2024-12-31T23:17:47.944Z","dependency_job_id":"9a696b5a-200b-4515-b3f1-d2e42e605c03","html_url":"https://github.com/solidusio-contrib/solidus_volume_pricing","commit_stats":{"total_commits":282,"total_committers":54,"mean_commits":5.222222222222222,"dds":0.8794326241134752,"last_synced_commit":"9547d43be5acf87911e5cee1d3834580da104df8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_volume_pricing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_volume_pricing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_volume_pricing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio-contrib%2Fsolidus_volume_pricing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidusio-contrib","download_url":"https://codeload.github.com/solidusio-contrib/solidus_volume_pricing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250330264,"owners_count":21412953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["discounts","extension","pricing","quantity","solidus","volume"],"created_at":"2024-10-02T09:53:32.125Z","updated_at":"2025-04-22T21:42:40.335Z","avatar_url":"https://github.com/solidusio-contrib.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Volume Pricing\n\n[![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_volume_pricing.svg?style=svg)](https://circleci.com/gh/solidusio-contrib/solidus_volume_pricing)\n[![Code Climate](https://codeclimate.com/github/solidusio-contrib/solidus_volume_pricing/badges/gpa.svg)](https://codeclimate.com/github/solidusio-contrib/solidus_volume_pricing)\n\nVolume Pricing is an extension to Solidus that uses predefined ranges of quantities to determine the\nprice for a particular product variant.\n\nFor instance, this allows you to set a price for quantities between 1-10, another price for\nquantities between (10-100) and another for quantities of 100 or more. If no volume price is defined\nfor a variant, then the standard price is used.\n\nEach VolumePrice contains the following values:\n\n1. **Variant:** Each VolumePrice is associated with a _Variant_, which is used to link products to\n   particular prices.\n2. **Name:** The human readable representation of the quantity range (Ex. 10-100). (Optional)\n3. **Discount Type** The type of discount to apply.  **Price:** sets price to the amount specified.\n     * **Dollar:** subtracts specified amount from the Variant price.\n     * **Percent:** subtracts the specified amounts percentage from the Variant price.\n4. **Range:** The quantity range for which the price is valid (See Below for Examples of Valid\n   Ranges.)\n5. **Amount:** The price of the product if the line item quantity falls within the specified range.\n6. **Position:** Integer value for `acts_as_list` (Helps keep the volume prices in a defined order.)\n\n## Install\n\nThe extension contains a rails generator that will add the necessary migrations and give you the\noption to run the migrations, or run them later, perhaps after installing other extensions. Once you\nhave bundled the extension, run the install generator and its ready to use.\n\n      rails generate solidus_volume_pricing:install\n\nEasily add volume pricing display to your product page:\n\n      \u003c%= render partial: 'spree/products/volume_pricing', locals: { product: @product } %\u003e\n\n## Ranges\n\nRanges are expressed as Strings and are similar to the format of a Range object in Ruby. The lower\nnumber of the range is always inclusive.  If the range is defined with '..' then it also includes\nthe upper end of the range.  If the range is defined with '...' then the upper end of the range is\nnot inclusive.\n\nRanges can also be defined as \"open ended.\"  Open ended ranges are defined with an integer followed\nby a '+' character.  These ranges are inclusive of the integer and any value higher then the\ninteger.\n\nAll ranges need to be expressed as Strings and can include or exclude parentheses.  \"(1..10)\" and\n\"1..10\" are considered to be a valid range.\n\n## Examples\n\nConsider the following examples of volume prices:\n\n| Variant | Name | Range | Amount | Position |\n| ------- | ---- | ----- | ------ | -------- |\n| Rails T-Shirt | 1-5 | (1..5) | 19.99 | 1 |\n| Rails T-Shirt | 6-9 | (6...10) | 18.99 | 2 |\n| Rails T-Shirt | 10 or more | (10+) | 17.99 | 3 |\n\n### Example 1\n\nCart Contents:\n\n| Product | Quantity | Price | Total |\n| ------- | -------- | ----- | ----- |\n| Rails T-Shirt | 1 | 19.99 | 19.99 |\n\n### Example 2\n\nCart Contents:\n\n| Product | Quantity | Price | Total |\n| ------- | -------- | ----- | ----- |\n| Rails T-Shirt | 5 | 19.99 | 99.95 |\n\n### Example 3\n\nCart Contents:\n\n| Product | Quantity | Price | Total |\n| ------- | -------- | ----- | ----- |\n| Rails T-Shirt | 6 | 18.99 | 113.94 |\n\n### Example 4\n\nCart Contents:\n\n| Product | Quantity | Price | Total |\n| ------- | -------- | ----- | ----- |\n| Rails T-Shirt | 10 | 17.99 | 179.90 |\n\n### Example 5\n\nCart Contents:\n\n| Product | Quantity | Price | Total |\n| ------- | -------- | ----- | ----- |\n| Rails T-Shirt | 20 | 17.99 | 359.80 |\n\n## Additional Notes\n\n* The volume price is applied based on the total quantity ordered for a particular variant. It does\n  not apply different prices for the portion of the quantity that falls within a particular range.\n  Only the one price is used (although this would be an interesting configurable option if someone\n  wanted to write a patch.)\n\n## License\n\nCopyright (c) 2009-2015 [Spree Commerce][2] and [contributors][3], released under the\n[New BSD License][4].\n\n[1]: https://github.com/solidusio-contrib/solidus_volume_pricing/blob/master/CONTRIBUTING.md\n[2]: https://github.com/spree\n[3]: https://github.com/solidusio-contrib/solidus_volume_pricing/graphs/contributors\n[4]: https://github.com/solidusio-contrib/solidus_volume_pricing/blob/master/LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_volume_pricing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidusio-contrib%2Fsolidus_volume_pricing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio-contrib%2Fsolidus_volume_pricing/lists"}