11 replies [Last post]
rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Was this information Helpful?

I've installed the newest version of Ubercart 2 on a Drupal 6 site, and the Stock module is enabled.

There's all sorts of functions in Ubercart for dealing with inventory, such as automatic deduction on purchase, a warning e-mail when the stock gets low, and a default quantity to add to cart, when I create a product - but there's nowhere to set the actual stock levels...??!

When I add a product, there's no field for setting a stock level for the product. On the product view, there's no tab called "Stock", as I've Seen described in the Ubercart 1 documentation. So all in all I have no way of using the stock module for anything - there's nowhere to manage stock levels! What am I missing here?

I know there's some contribued inventory API's, but I can't figure out if they're compatible with Drupal 6.

Should there be embedded functionality to deal with stock levels in the basic Ubercart 2 installation, or should I make this myself using functions in the stock module?

thill's picture
Offline
Joined: 01/25/2008
Juice: 815
Re: No stock tab - nowhere to set stock levels?!

You don't see a stock tab under the product edit? as shown in images below? Check permissions?

AttachmentSize
stock tab.jpg 41.33 KB
Stock 2.jpg 116.55 KB
rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Hi Thill As always it's me

Hi Thill

As always it's me who's semi-blind! I didn't realise it was a "sub-tab" that would only appear after clicking the "Edit" tab.

I see it with my admin user, and after playing around with my permissions, I found out that the "Administer products" permission must be given for other users to see it.

Still, there's something I don't understand... Why aren't there a field for the stock level directly on the add new product form? It seems odd that you have to create a product and then afterwards go and edit it to give a stock level. Or am I still just missing something?! Eye-wink

If there's indeed no way to set stock levels when adding a new product, how would you recommend I add this feature? By making my own functions to modify stock levels in the DB or are there some useful functions for this somewhere in the vast Ubercart framework?

Thanks!

thill's picture
Offline
Joined: 01/25/2008
Juice: 815
Re: Hi Thill As always it's me

Well because of how a product form is built and saved there are things not available until after the product has been created. Attributes, product features, and stock have to all be done after the product node is created.

Hopefully moving forward in Drupal 7 we could build an ajax type form like Views 2 where everything about a product can be entered and then saved without having to go into the edit tab right after the product is saved.

If the stock field is exposed to views you might want to setup a editable view of all the products along with the stock field and edit them all on one screen. I haven't done this but sounds possible.

rsm08's picture
Offline
Joined: 01/28/2009
Juice: 50
Re: Re: Hi Thill As always it's me

The reason that these things must be added after the product node has been added, must be because they go in to other DB tables using the node id, right?

I still very new at Drupal, but I would think this could easily be done by modifying the form submit function. When a form is submitted, Drupal calls the [form function]_submit function for processing the data. Using this function, it should be easy to grab the new node id from the DB and do whatever needs to be done to set the stock level for the node.

Still, I don't know how Ubercart handles stock levels. Are there some functions for setting the stock levels, or do I have to modify the DB directly. If so, can you give me a hint on what tables Ubercart uses for this?

Thanks!

quikone's picture
Offline
Joined: 03/01/2009
Juice: 578
stock levels out of stock

I would like to add on to this with a question, How do I or the system indicate that an item is out of stock? I do see the stock tab, but I have noticed whether I have the check box ticked or not the item is still available for sale?

thill's picture
Offline
Joined: 01/25/2008
Juice: 815
Re: stock levels out of stock

That check box has nothing to do with the item availability, I believe there is a contrib module for unpublishing products when there is 0 stock, or you might be able to setup a conditional action to trigger this.

Scott M. Sanders's picture
Offline
Joined: 04/24/2009
Juice: 323
Re: Re: stock levels out of stock

Unpublishing a product does not make it completely unavailable to add to one's cart either, if say you're using cart links on an external website for your customers' shopping experience instead -- and your customers bookmark those links, something out of one's control.

So I also need a real, working "out of stock" solution for Ubercart...

Scott M. Sanders's picture
Offline
Joined: 04/24/2009
Juice: 323
Re: Re: Re: stock levels out of stock

Actually this page has some solutions, yay:
http://www.ubercart.org/docs/user/5181/out_stock_solutions

marcus178's picture
Offline
Joined: 04/13/2009
Juice: 113
Re: No stock tab - nowhere to set stock levels?!

One way to get around the stock button not appearing until you've saved is to use http://drupal.org/project/multistep. Once you click next step the node is saved and the stock option appears.

tristanwatson's picture
Offline
Joined: 06/14/2010
Juice: 8
Multistep

The idea of using multistep to set stock levels during product creation is ideal for what we're doing. Have got multistep installed and working, but can't find an option to include stock levels during the process. How do you think I would include it?

martinmenge's picture
Offline
Joined: 09/30/2010
Juice: 30
Missing Tabs - Stock control solved for UC2 D6

For weeks I could not figure out a proper Stock control for a site about to launch. I finally found the problem. My secondary tabs on the theme was missing. http://groups.drupal.org/node/83194 Drupal 6 and Ubercart 2 Fixed stock