This Ubercart module allows the administrator to define groups of products that are sold in restrictive quantities per order. This module works differently than other quantity-restricting modules and can be used where more flexibility is needed. The technique used here is to leverage the power of Taxonomy. This allows restrictions to bridge many diverse products.
Example Scenario: We sell several types of reusable grocery bag products. Some of our products are much sought-after on EBay, so we have a problem with customers buying up huge quantities for the secondary market. Using this module, the customer may order only ten grocery bags per order. If the problem only affects grocery bags A and C, we can include only those products in the restriction so that grocery bag B is unlimited. Then we really get crazy and we add one of our water bottles to the group so that the customer can only buy ten of any combination of the grocery bags + water bottles. But then we decide if they are ordering a combination of water bottles and bags, let's allow them 15. So we create a restriction of 15 that includes water bottles and gift bags. These two restrictions can co-exist, and the system will automatically apply the most restrictive restriction to the customer, depending on the products in his or her cart.
The module is designed to fulfill the hidden complexities that might emerge in these requirements, without whining.
The module also provides a dropdown-quantity feature to assist the customer in selecting an appropriate quantity as early as possible in the shopping process. Due to being unable to foretell the future, there are some more complicated scenarios where a combination of drop-downs on the cart page would allow quantities beyond the restrictions, which is protected by server-side validation on submitting the form.
Most of the process just consists of setting up a standard Vocabulary:
- Install the module as usual (http://drupal.org/getting-started/install-contrib/modules).
- Create the Vocabulary that will be used to store the restriction Terms, if one does not already exist (http://mine.com/admin/content/taxonomy/add/vocabulary).
Make sure in the Vocabulary definition to select the Product or Product Class node types that will be included in the restricitons.
- Select the Vocabulary that will be used to store the restriction Terms(http://mine.com/admin/store/settings/restricted-groups).
- Create the Terms in the vocabulary. Example: "Restricted to 10 Items." The page in the above step will provide you with a quick link to the Terms. Note at the bottom of the form to create/edit the terms in this Vocabulary, there are settings that pertain to this module, including Quantity, and whether to display quantity field as a dropdown.
- Assuming you have set up one or more Products in your Ubercart Store, navigate to the Edit form for the Product. Under the setting for Vocabularies, select the restriction Term you defined above. You may of course assign this term to any number of Products across your Catalog.