Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Can I reduce inventory based on weight instead of units?

Can I reduce inventory based on weight instead of units?

Views: 2,279

Results 1 to 12 of 12
21 Jan 2013, 11:02 PM
#1
paperpixels avatar

paperpixels

New Zenner

Join Date:
Jan 2013
Posts:
1
Plugin Contributions:
0

Can I reduce inventory based on weight instead of units?

Our system currently reduces inventory levels in single increments. For instance, if we have 25000 grams and a customer purchases 5500 grams, it should reduce to 19500. Instead it will reduce to 24999 - one increment. So we have no accurate way of knowing our stock levels.

I believe this is a result of customers purchasing one unit (e.g. 1 kg bag) but I am unsure how to rectify this in terms of inventory levels. An example of the type of product is here on the site http://craftbrewing.co.nz/malts-grains/specialty-malts/amber-malt

Thanks.

22 Jan 2013, 11:20 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Can I reduce inventory based on weight instead of units?

I haven't used it, but there is an option to specify a weight for each attribute. That might let you track total grams sold.

22 Jan 2013, 3:41 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I reduce inventory based on weight instead of units?

So what you are saying is ...

Your Product Quantity is 25000 ...

Then your Attributes are:
10gr
50gr
100gr
1kg

So when I buy 3 10 gr ... you want the Product Quantity to be reduced to:
25000 - (3 * 10) = 24970

correct?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Mar 2013, 1:54 PM
#4
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

Ajeh:

So what you are saying is ...

Your Product Quantity is 25000 ...

Then your Attributes are:
10gr
50gr
100gr
1kg

So when I buy 3 10 gr ... you want the Product Quantity to be reduced to:
25000 - (3 * 10) = 24970

correct?

Hi Ajeh,
Yes that is correct, I am looking to do that exact same thing.

18 Mar 2013, 2:17 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I reduce inventory based on weight instead of units?

Is this true on ALL Products or just SOME Products?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Mar 2013, 3:42 PM
#6
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

Ajeh:

Is this true on ALL Products or just SOME Products?

Thanks for the quick reply. It is just for SOME products. I was wondering if we should maybe be looking at stock by attributes? Here is a normal scenario that may help to explain how we would like it to work.

Product A = Hops= 1kg-not priced by attributes, just one standard item and the price is $21.00 (have 50 in stock), 1 sells, shows 49 in stock

Product B = Grains = priced by attributes, actual product does not have a price in, weight is set as 0.1 - the attribute prices are:
Bag Size
10grams = 10c
50grams = 31c
100grams = 63c
1kg = $6.32

This is a project I have taken over on, so some of the things may be setup incorrectly? I am thinking maybe the attributes need to be set by weight?

For shipping we are using Ceon Advanced Shipper - based on postal code and price is based on weight.

Thanks

18 Mar 2013, 3:45 PM
#7
gandalfsmith avatar

gandalfsmith

New Zenner

Join Date:
Oct 2011
Location:
Toronto Canada
Posts:
69
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

Ajeh:

Is this true on ALL Products or just SOME Products?

PS: More than happy to send you a PM with back end login info as it is a test site that I am working on (needs to be correct first) to replace the current site that has too many other errors.

18 Mar 2013, 4:01 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I reduce inventory based on weight instead of units?

I do not believe Stock by Attributes would help you on this as the stock numbers are based on 1 quantity means reduce by 1 and you want some reduced by 1 and some reduced by quantity * a factor ...

You would need to customize the stock deduction in the orders class for this ...

One thought might be to add a new field to products table to indicate what its quantity factor is and utilize that for reducing stock ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 May 2020, 8:13 PM
#9
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

I know this is an old thread, but I felt it better to bump it than start my own. I am in a similar situation, and am looking to automate stock and inventory, however the website we sell our products on has over 600 products, every single one with different weights. Has there been a formal solution to this problem as of yet? I can do some mild code editing myself, but I definitely do not know how to do this as it stands. I was considering utilizing something like easy populate, stock by attributes, or some free automation export service to try and update an excel document automatically when orders come in, with a value multiplier based on what attribute is selected, but if there is a way to do this natively with zen-cart, that would be ideal. Also hoping to keep everything cross referenced with eBay and possible other venues, but right now the main priority is keeping inventory of products with multiple weight attributes.

4 May 2020, 9:11 PM
#10
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Can I reduce inventory based on weight instead of units?

Can't you just set the stock level to the weight number and have them order in weight quantities? Example: you have 1000 pounds of product so there is 1000 units in stock. When they order, the quantity box is for how many pounds they want to order. It shouldn't matter if each product uses a different weight unit, you simply stock by that unit and the customers order the quantity of units needed.

If you want to display what that weight unit is on each product listing by the quantity box or wherever, you would need to add a new column to the products table in the database, and some corresponding code in collect_info to create a text box to input the weight unit, as well as on the store side wherever you want it displayed. You should be able to look at a different field on collect_info and duplicate the code, and the same for the template files for the store side. Or you can simply add the weight unit to the title and/or description and no code is needed.


Zen Cart and it's community are the best!!

5 May 2020, 12:25 AM
#11
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

That is one solution, but that would require manually weighing every item we sell when it is sold. We have pre-packaged items in glass jars that we sell in the 1 oz and 4 oz increments, and this saves a lot of time from having to run to the storage room and pull out a bulk package to weigh out and label whatever is ordered.

We can't do individual products per size I don't think, we have 600+ products currently and the site is quite bloated. Expanding that to 1800, or more like 3200 when it comes to cut/sift vs. powdered forms of product would be a logistical nightmare not just to manage but to browse as a customer.

5 May 2020, 12:51 AM
#12
koda avatar

koda

New Zenner

Join Date:
Feb 2011
Posts:
57
Plugin Contributions:
0

Re: Can I reduce inventory based on weight instead of units?

Ajeh:

I do not believe Stock by Attributes would help you on this as the stock numbers are based on 1 quantity means reduce by 1 and you want some reduced by 1 and some reduced by quantity * a factor ...

You would need to customize the stock deduction in the orders class for this ...

One thought might be to add a new field to products table to indicate what its quantity factor is and utilize that for reducing stock ...

This sounds like the right solution however. 4x multiplier for 4 oz, 16 for lb, etc. So add a new field in the database products table called "stock_multiplier", set the equation, now the question is where is the file that needs to be changed in order to apply this new field before reducing stock, and how to properly amend it.