This module is a Drupal Commerce extension (for Drupal 7.x version) that enables discrete quantity discount for commerce products. It is a drupal commerce addon module that enables discounts for quantity purchases of products but restricts the quantity choices to only the values defined by the store administrator.
Features
- It enables discrete quantity select widget on the display views of the products it's enabled on.
- It also replaces the quantity textfield input on the shopping cart with a discrete quantity select input thereby restricting quantiy choices only to those defined for that product.
- It also provides a field formatter to display the discrete quantity/price values as a table on the product display view.
Installation, configuration and setup
- Install the Drupal Commerce module and configure as required
- Enable the module
- Browse to Store -> Products -> Product Types (tab)
- Click the 'Manage Field' link of the basic product type or of any other product type you desire.
- Create a new field of type 'Quantity Discount Price table', configure it with unlimited or a fixed set of values and add a default value
- Add a product of the type configured above and add as many quantity(discrete)/price pairs as required
- Your product is now ready to handle discrete quantity discounts
The motivation for this module: Other commerce discount modules deals with ranges of quantity like 1-5, 6-10, 11-15, etc. A client needed a feature to handle discrete quantities like 5, 10, 15, etc, quantities in between not allowed. So the concept for this module was born.
Project page: http://drupal.org/sandbox/togbonna/1595096
Repository:
git clone http://git.drupal.org/sandbox/togbonna/1595096.git commerce_discrete_quantity_discount
A Drupal 7.x version project.
See the README.txt here: http://drupalcode.org/sandbox/togbonna/1595096.git/blob/HEAD:/README.txt.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | commerce_discrete_quantity_discount.png | 7.48 KB | togbonna |
| #1 | commerce_discrete_quantity_discount2.png | 12.11 KB | togbonna |
| #1 | commerce_discrete_quantity_discount3.png | 17.87 KB | togbonna |
Comments
Comment #0.0
togbonna commentedUpdated the features set into bullet-points.
Comment #1
togbonna commentedAccompanying screen shots.
Comment #1.0
togbonna commentedAdded further details
Comment #2
klopsen commentedHi.
Please clear masterr branch - leave only readme.txt file.
More issues that should be done you can find here:
http://ventral.org/pareview/httpgitdrupalorgsandboxtogbonna1595096git
Regards
Comment #3
patrickd commentedNote that many of the issues found are minor and should not be required for approval, therefore please do not insist on having them fixed and do not switch the issue to needs work if there are no major issues found.
Comment #4
msmithcti commentedHi,
I've taken a look at the module, code-wise there's nothing that jumps out at me as being wrong. There is a few issues I've found when working with the UI:
@todoregarding the error message), is this by design? The default values that I do enter aren't then even shown on field widget. When entering the price here, saving the form and then coming back to it the price gets a few extra decimals. There's obviously something funny going on with the conversion between major and minor values.I've also noticed the git clone snippet is wrong in your issue description - it should be:
git clone http://git.drupal.org/sandbox/togbonna/1595096.git commerce_discrete_quantity_discountHope that helps.
Comment #4.0
msmithcti commentedInstallation, configuration and setup instructions added.
Comment #5
togbonna commentedCorrected.
Comment #6
patrickd commenteddon't forget to switch back to needs review if your ready
Comment #7
togbonna commentedAm aware of that.
Am still working on splatio suggestions above.
Thanks.
Comment #8
togbonna commentedI have made the default values optional and the saved values now displays correctly.
The price table values are not optional. At least a value must be entered.
The price table is just a guide to the prices of each quantity.
Comment #9
togbonna commentedThis not possible via simple Ajax because the price displayed is not part of the add to cart form element.
Comment #10
gedur commentedhi! Thanks for your module, I think it will be very useful.
There is a few issues I've found:
- Add the commerce module to the dependencies on the .info file to help drush download dependencies on install.
- In a product display with two products (The same product type one with 3 discount prices and the other with none):
- The "Discount price: " label renders on both cases, I think in only be on the first one.
- I've got the notice: Undefined index: #value in commerce_discrete_quantity_discount_form_alter() (line 528 of /var/www/drupal7/sites/all/modules/testing/commerce_discrete_quantity_discount/commerce_discrete_quantity_discount.module).
- I don't know how it works but if I only have one product display the add to cart form renders as a selector with all my configured options but it doesn't shows on multiple product display.
- If I don't specify values the cart forms renders as an empty select. Why do not let users to select any value on any case?
Hope that helps.
Comment #11
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #12
Robert21 commentedHi guys,
I have a product that can be ordered in a way multiples of a number, for example 5,10,15,20,25, ... (multiples of a number)
I ask for an idea how to do that, I do not know how to go about this, I could not find anywhere interesting answers.
Is this possible with this module? Would you recommend something else?
Comment #13
togbonna commentedHi Robert21,
That's exactly what the module does. Am not aware of any other solution at the moment.
If there is further interest in this solution I could 'push' to have this module out of sandbox and into the contrib modules main listing.
Comment #13.0
togbonna commentedCorrected repository
Comment #14
PA robot commentedProject 1: https://www.drupal.org/node/2209133
Project 2: https://www.drupal.org/node/2064317
Project 3: https://www.drupal.org/node/1606388
Project 4: https://www.drupal.org/node/1102706
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15
avpaderno