When someone purchases an item of a particular size in my client's store, I need an option to adjust the stock by the value of the attribute instead of -1?

Any ideas? Anyone want to take this on?

Backstory...

I would like to manage an item's stock level based on which attribute is purchased and not how many (although I would expect the quantity field to still be effective). I can imagine this might be of use to anyone who stores their inventory in bulk but sells it in sizes that are measured just prior to delivery.

I've got an inventory of chemicals stored in bulk volume (e.g. 127mg). In my store, customers choose to purchase 0.5mg, 1mg, 5mg, 10mg, or 25mg. (no, nothing illegal)

We can't divide the inventory into units because we don't know what sizes will be needed and don't want to disturb the inventory unless absolutely necessary.

Customers would think we were ridiculous if we asked them to purchase 50 x 0.5mg units when they wanted 25mg of something. It's just not done.

So, we it set up so that customers select an "amount" attribute which lets them select how much of the stuff they need and get the appropriate price.

The problem is that the inventory management is still setup to remove one unit from stock when we need it to remove 0.5, 1, 5, 10, or 25 "units" from stock as people purchase in different "sizes".

So, what I need is for the inventory management to look at the attribute value (0.5,1,5,10,25) and remove that number of units from inventory when an item with that particular attribute is purchased.

(BTW, if it's too much trouble to track fractional units, we CAN track inventory as a quantity of 0.5 units. (e.g. 10mg = 20 0.5mg units)

I would imagine this would be of value to just about anyone who deals with "pour-to-order" situations...

Comments

videographics’s picture

Project: Ubercart Stock Manager With Attributes » Ubercart
Version: 6.x-1.x-dev » 6.x-2.4
Component: Code » Stock

Ok, digging into this more I see it is a can of worms. I could fix it as the order's placed with some php in the "Decrement stock upon order submission" action but that would only get me so far. My sense is that this issue becomes much more complicated when you start thinking about checking for the availability of fractional units. Does anyone know if Ubercart 3 could possibly include some more sophisticated inventory management like this?

videographics’s picture

Version: 6.x-2.4 » 6.x-2.x-dev

I'm ready to make this a feature request. Here's the spec.

Setup uc Stock to handle the sale of fractional measures so that sellers who store their product in bulk (think liquid measures) and "pour to order" can use Ubercart to manage their inventory.

Expect the existing Quantity field to remain as it is and continue to work with whole numbers (e.g. the customer bought 2.5-liter bottle of the stuff.). Ideally, the inventory system would be able to deal with stock in fractional amounts in parallel with the existing system of quantity purchased. The liquid volume of each SKU and the associated price would be handled using attributes.

When a SKU with a specific volume of product is purchased, the system will check the stock level based on the volume needed for that SKU and the appropriate measure will be removed from stock based on the volume attribute.

I'm ready and willing to brainstorm approaches and interface ideas and test for anyone interested in working on this. I think there are many businesses that could benefit from this.

Kalorlo’s picture

This is exactly what I'm looking for - I want to be able to set my stock level for a product in grams, then customers can buy in bundles of 100g, 250g, 500g or 1kg (which are option attributes), and the stock level is decremented by the amount they bought.

longwave’s picture

Status: Active » Closed (duplicate)
longwave’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Closed (duplicate) » Active

Actually, it's not quite the same!

Kalorlo’s picture

Heh, yeah - my customers can buy different quantities just fine. But no matter what option size they choose, the stock is only decremented by 1. Which... isn't ideal. At the moment I'm just fudging it by keeping an eye on stock and when it gets low, I'm switching off all sizes except the smallest so stock control works. This is only doable because I have low sales volume.

pareen’s picture

Did you find a solution for this?

Still looking for this.

tr’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev