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

  1. Install the Drupal Commerce module and configure as required
  2. Enable the module
  3. Browse to Store -> Products -> Product Types (tab)
  4. Click the 'Manage Field' link of the basic product type or of any other product type you desire.
  5. 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
  6. Add a product of the type configured above and add as many quantity(discrete)/price pairs as required
  7. 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.

Comments

togbonna’s picture

Issue summary: View changes

Updated the features set into bullet-points.

togbonna’s picture

Accompanying screen shots.

togbonna’s picture

Issue summary: View changes

Added further details

klopsen’s picture

Status: Needs review » Needs work

Hi.

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

patrickd’s picture

Status: Needs work » Needs review

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

msmithcti’s picture

Status: Needs review » Needs work

Hi,

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:

  • When creating the field for the price table I'm unable to save the form unless I enter default values (I have noticed there is a @todo regarding 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.
  • If the price table field is left as optional and no values are entered, an empty select box is shown. Would it be better to just hide it completely if there's no price table values?
  • How are the price field and price tables field meant to work together? I have a feeling this could get confusing for both customers and admins. Could this be demonstrated better - i.e. changing the price in the add to cart form when a different quantity is selected?

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_discount

Hope that helps.

msmithcti’s picture

Issue summary: View changes

Installation, configuration and setup instructions added.

togbonna’s picture

Corrected.

patrickd’s picture

don't forget to switch back to needs review if your ready

togbonna’s picture

Am aware of that.

Am still working on splatio suggestions above.

Thanks.

togbonna’s picture

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

togbonna’s picture

Status: Needs work » Needs review

... changing the price in the add to cart form when a different quantity is selected?

This not possible via simple Ajax because the price displayed is not part of the add to cart form element.

gedur’s picture

Status: Needs review » Needs work

hi! 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.

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

Robert21’s picture

Hi 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?

togbonna’s picture

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

togbonna’s picture

Issue summary: View changes

Corrected repository

PA robot’s picture

Status: Closed (won't fix) » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

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

avpaderno’s picture