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

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
SteveHiner
Lieutenant (LT)
Lieutenant (LT)
Posts: 58
Joined: Thu Jun 21, 2007 8:27 pm

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

Post by SteveHiner » Mon Nov 10, 2008 10:57 am

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Mon Nov 10, 2008 1:14 pm

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.

SteveHiner
Lieutenant (LT)
Lieutenant (LT)
Posts: 58
Joined: Thu Jun 21, 2007 8:27 pm

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

Post by SteveHiner » Mon Nov 10, 2008 6:31 pm

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Tue Nov 11, 2008 6:27 am

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

Post Reply