If I f.ex. only want to allow ordering 10 pcs. or more..

I'd set up price table, so the first range is from 10 to 100 pcs. next from 101 to 200 etc.

Currently the price in the $price field (which I've hidden in my case) is used for prices outside of the ranges in price table.

I would like price table to have the option to disallow ordering amounts outside of the amount ranges in the price table.

It could be done in 1 of 2 ways:

1) Check for it, while adding to cart (and while updating cart)
- this would require an "amount" field next to the add to cart button, so one could put f.ex. 12 items in the cart at once.

2) Check for it on checkout, and redirect the user to the cart view with a notify of what items have a wrong amount.

I'm thinking 2 would be the best option, since it doesn't require there to be an amount field to add an item to the cart.

I am considering coding this myself, and would like the feature added to price_table module, so I'm seeking feedback :)

Comments

pcambra’s picture

Status: Active » Closed (works as designed)

This feature is out of scope of the module feature list.

This module just displays the prices in a table, doesn't take care of what happens next, you'll need some rules or coding to solve your issue it would be really similar to http://drupal.org/project/commerce_moa

klavs’s picture

I agree. I had found that module, and was considering using that as the basis.

Only thing is that a new module, would require price_table (since the quantities to NOT allow - would be in the price_table fields) - so I felt it belonged with price_table - instead of as a seperate module.

But fair enough - I'll code it as a seperate module that "peeps" in the price_table fields to see quantityes covered, if I decide that I need it :)

pcambra’s picture

Actually the dependency with price table is not forced, if you configure the max price and get the price added to the cart as parameter, you can do it as generic as you want.