This is a patch that adds hook_nodeapi to the uc_stock module so that node updates, inserts, deletes, loads & views for product nodes also include stock data.
This is very useful if you are importing products using node_save and you have stock data in your import csv, among other things.
The patch also has some changes to uc_product, which work with the new uc_stock nodeapi code to allow the stock levels to be displayed when viewing products. The quantity available is now a selectable field in the product settings page (admin/store/settings/products).
This allows users to see how much of a product is in stock. It can also be themed so that if the qty is zero it displays a message saying that there will be a delivery delay or something like that.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ubercart-6.x-2.0-beta5_stock_nodeapi.patch | 7.43 KB | agileware |
| ubercart-5.x-1.4_stock_nodeapi.patch | 10.9 KB | agileware |
Comments
Comment #1
rszrama commentedThe problem I see with this patch is that we don't have a 1 to 1 correlation between product nodes and SKUs. This code assumes the node will have a single stock value, whereas a product with multiple SKUs and different stock levels would be left in the cold. I'm not opposed to the concept here, I just don't think this accommodates core well enough.
Comment #2
rszrama commentedComment #3
agileware commentedHere is a new version of this patch that works for 6.x-2.0-beta5.
It still doesn't have support for products with multiple sku's though. I'll have a look into that at some point.
Comment #4
agileware commentedCan this please be considered for Ubercart 3? Added to the battle plans.
Cheers
Justin
Comment #5
rich.yumul commentedSubscribing...
Comment #6
hanoiiadding tags
Comment #7
hanoiiNot exactly the same issue, but this one might be a bit too wide.
Have a look at the related issue #423262: Stock information not deleted with node
Comment #8
tr commentedComment #9
tr commentedChanging component.
Comment #10
Sindbad-1 commentedHi,
My requirement is to be able to display the Stock level on the Product node. I did apply the patch mentioned in #3, I did it manually by updating the necessary files. I have set the appropriate role permission as well. Under Store Administration->Configuration->Product Fields, I have enabled "Available Stock Qty". However, I still can't view the stock levels on the Product page.
Do I have to do anything else? This is quite urgent. Any help is greatly appreciated.
Thanks.
Comment #11
smartango commentedwould you revise this: #1398448: stock sku consistency on node update/delete
it is (would be) a solution for ubercart 7.x-3.x-dev