Product Maximum for Checkout


Allows you to set a maximum number that can be ordered, individually by product. Currently a blank value allows for no maximum, and any maximum value set applies regardless of optional attributes (the total number is compared to the maximum).

This was developed to work as the opposite of Product Minimum for Checkout, and draws heavily on its original structure:

Also, critical components of the code were drawn from this discussion:

uc_product_max.tar30 KB
jmary's picture
Joined: 01/09/2008
Juice: 55
This is max item

Could it be max amount ? IS it possible to add the option for the max amount ?

mandclu's picture
Bug Finder
Joined: 11/19/2007
Juice: 78
Re: This is max item

I'm not sure I understand the distinction you're making. Can you elaborate?

magnus's picture
Joined: 05/23/2008
Juice: 20
Added Views field


I posted this in the forum before seeing the module had been added to the contribution.

I've added the product max field to use it in Views

It permits to add "Product: max per order" field a view.

function uc_product_max_views_tables(){
  $tables['uc_product_max'] = array(
    'name' => 'uc_product_max',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      'right' => array(
        'field' => 'nid',
    'fields' => array(
        'product_max' => array(
        'name' => 'Product: Max per order',
        'help' => t(''),
        'field' => 'product_max',
  return $tables;

This is simply added to the uc_product_max.module file.

mikeryan's picture
Joined: 09/12/2008
Juice: 27

Is there a Drupal 6/Ubercart 2 version of this module?


atlithor's picture
Joined: 03/09/2009
Juice: 9
Re: Product Maximum for Checkout

Does anyone knows an alternative to this module which works in drupal 6 and ubercart 2?


CKoch's picture
Joined: 05/29/2009
Juice: 10
Re: Product Maximum for Checkout

Anyone upkeeping this module to get it to work with Ubercart 2/D6?

phelix's picture
Joined: 06/01/2009
Juice: 64
Re: Re: Product Maximum for Checkout

I could really use the Minimum version of this product if anyone knows how to get any of these max or min modules to work!

fred0's picture
Joined: 07/05/2009
Juice: 10
Module update for Drupal 6.x and UC 2.x

Since I'd updated the Product Minimum module, I decided to do the same for Product Maximum since I needed its functionality too.

Like the Minimum module, this update seems to work fine but I haven't fully tested it so, standard disclaimers apply.

uc_product_max.tar.gz 3.27 KB
epg's picture
Joined: 09/26/2009
Juice: 56
hiding "a maximum number of x is allowed" on product page

Is there a way of hiding the message "a maximum number of x" is allowed on the products page?

I'm selling a file download and that the maximum is 1 is obvious. I don't need this message on my products page, it sounds unfriendly and restrictive to the customer. How can I get rid of it?


Oh, I'm on Ubercart 2.x on Drupal 6.13.

epg's picture
Joined: 09/26/2009
Juice: 56
Figured it out

I commented out lines 178-179 in file uc_product_max.module.

Too bad I had to hack the module core. Sad.

In a future release the original developer might want to make this display a configurable option.

raman2385's picture
Joined: 10/20/2009
Juice: 23
max per customer

Is there a way to restrict the max number of product a user can buy??
i.e. restrict according to user n not order

marcus178's picture
Joined: 04/13/2009
Juice: 113
Default qty

Is there anyway way to set the default amount, as in most cases it will be the same and I'd prefer not having to fill the field in every time I create a product.

fred0's picture
Joined: 07/05/2009
Juice: 10
Combined modules

FYI, I combined min & max modules and released them via the repository here:

chourmovs's picture
Joined: 02/22/2009
Juice: 52
marvelous i'm testing it and

i'm testing it and i'll giv you feedbacks

Alaska's picture
Joined: 10/16/2007
Juice: 1430
Re: Product Maximum for Checkout

An interesting combination would be to tie min-max to uc_stock. As an example, if inventory for a product was set at 10 then min-max would limit a purchase to no more than 10. If fewer were purchased then min-max would be updated to reflect current inventory. And when zero stock is reached prevent a purchase or un publish the node. Looks like product_max would have to be updated with the use a database update, etc.