Forums / Basic Configuration / How to best handle quantity on hand and stock levels

How to best handle quantity on hand and stock levels

Views: 1,459

Results 1 to 8 of 8
11 Aug 2015, 6:14 PM
#1
in2deep avatar

in2deep

Zen Follower

Join Date:
Jul 2011
Posts:
214
Plugin Contributions:
0

How to best handle quantity on hand and stock levels

For a store that sells ammo I have set up quantities as attributes. They are sold in quantities of 50, 100, 250, 500 and 1000.

I would like to have the stock levels be counted towards a main inventory count. For example if I have 100,000 rounds of 9mm I would like the sale of a box of 1000 to come off the total available and show that there are 99,000 left. Whats the best way to do this without using the SBA module?

11 Aug 2015, 6:51 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to best handle quantity on hand and stock levels

Two ways that I can think of, sell the item with a unit factor applied as in 50 since that appears to be your lowest common factor.
Another requiring some programming is to offer your attribute selection but somewhere in the process convert the attribute to quantity to be removed from your total stock.... This could happen in or as a result of the includes/classes/orders.php process when the stock is decremented. Could be done by an observer that is just waiting to remove the bullets from the group...

Since this more of a quantity by grouping instead of quantity by association, I am thinking that yes SBA is not the path for this issue...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

11 Aug 2015, 6:54 PM
#3
in2deep avatar

in2deep

Zen Follower

Join Date:
Jul 2011
Posts:
214
Plugin Contributions:
0

Re: How to best handle quantity on hand and stock levels

mc12345678:

Two ways that I can think of, sell the item with a unit factor applied as in 50 since that appears to be your lowest common factor.
Another requiring some programming is to offer your attribute selection but somewhere in the process convert the attribute to quantity to be removed from your total stock.... This could happen in or as a result of the includes/classes/orders.php process when the stock is decremented. Could be done by an observer that is just waiting to remove the bullets from the group...

Since this more of a quantity by grouping instead of quantity by association, I am thinking that yes SBA is not the path for this issue...

How do you apply the unit factor? There is only one general product listed and I'm using attributes in a drop down for quantity.

11 Aug 2015, 7:04 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to best handle quantity on hand and stock levels

In2Deep:

How do you apply the unit factor? There is only one general product listed and I'm using attributes in a drop down for quantity.

So, if using the unit factor then would do away with the attrbutes as they would well be confusing. If there are price differences for box sizes then could apply quantity discounts. The unit factor is located on the product info page when in the admn. There is also a minimum value which would just be wise to set at 50 as well.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Aug 2015, 2:22 AM
#5
in2deep avatar

in2deep

Zen Follower

Join Date:
Jul 2011
Posts:
214
Plugin Contributions:
0

Re: How to best handle quantity on hand and stock levels

So there isn't a solution?

19 Aug 2015, 11:29 AM
#6
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: How to best handle quantity on hand and stock levels

There's always a solution... :smile:

Instead of using attributes, you can make some code changes and convert the quantity input field into a select menu (drop down) with your preset quantities. As mc12345678 already mentioned, you could adjust the price with qty discounts (in case 1000 pieces costs less than 5x200 pieces). You would also need to make sure to edit the qty input on shopping cart page, as well as any product listing pages (product_listing, products_new, specials etc).

There is a caveat with this method - if for any reason I want to purchase 3 separate packages (one for me, one for my wife and one for my grandma) and I want 100+100+50, the shopping cart will NOT separate it and you'll get an order for a single package of 250... The only way I can think of to keep it separated is using attributes. And with attributes, you're stuck with using SBA... Although, I don't see why you don't want to use that plugin - it's pretty good and stable, easy to install and simple to maintain...

My site - Pro ZC Help
My portfolio | My plugins

28 Aug 2015, 6:37 PM
#7
in2deep avatar

in2deep

Zen Follower

Join Date:
Jul 2011
Posts:
214
Plugin Contributions:
0

Re: How to best handle quantity on hand and stock levels

Thank you for the help.

28 Aug 2015, 6:59 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,116
Plugin Contributions:
56

Re: How to best handle quantity on hand and stock levels

balihr:

There's always a solution... :smile:
... And with attributes, you're stuck with using SBA...
Agreed to the first, with yet-another caveat for the attributes-handling: Given that the "number of rounds" attribute is known, one could write a somewhat simple observer to check, upon order creation, whether such an attribute exists and to reduce the associated product's stock by the value specified in the attribute's value -- i.e. the attribute values for "Number of Rounds" are the (ahem) number of rounds: 50, 100, 200, etc.