Page 1 of 1

Can I have single piece pricing but force purchase of 100 pk

Posted: Mon Nov 10, 2008 10:57 am
by SteveHiner
My client sells some items in packs of 100 but he wants the pricing to be per-item because that's the way his industry prices things. Right now I can see how to set the minimum quantity to 100 but haven't seen a way to force the quantity to be in increments of 100.

Is there a way to do this built into the software or do I need to custom code this? I can certainly custom code it if I need to but I don't want to head down that path if it's built in. It would be really nice if it worked with the client side javascript validation too.

Any ideas?

Re: Can I have single piece pricing but force purchase of 100 pk

Posted: Mon Nov 10, 2008 1:14 pm
by mazhar
The complete code of this control is available in the following forums post.
viewtopic.php?f=44&t=8542
In order to change the step value from 1 to 100 find all calls to NPB_UpDown_Click function in the code and change the increment/decrement from 1 to 100.

Re: Can I have single piece pricing but force purchase of 100 pk

Posted: Mon Nov 10, 2008 6:31 pm
by SteveHiner
Thanks for sharing that code. That will certainly solve a chunk of my problem.

I'm wondering where's the best place in the database to indicate the increment size. Is there a recommended place to put custom values like that? I really don't want to add a field to the product table since it would make upgrading a royal pain later on but somewhere I'll need to store the increment size for certain products.

Re: Can I have single piece pricing but force purchase of 100 pk

Posted: Tue Nov 11, 2008 6:27 am
by mazhar
You can place this custom information in the ac_CustomFields table. There is no need for any modification. Data Access classes etc are already available with AbleCommerce7 for this table. Please read the following post
viewtopic.php?f=42&t=8684