13 replies [Last post]
joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
Was this information Helpful?

Hi Chaps,

I can't for the life of me see where I can add stock. I can change stock settings but just can't add any to a product/sku. I hoped the following link would help:

http://www.ubercart.org/docs/user/3366/selling_site_access_role_promotions

It states:

"On the product edit page you should see a "Stock" link. Clicking it will bring a form showing all possible SKU adjustments that are possible with your product."

However, I am unsure what the product edit page is and haven't been able to see the stock link.

Please could someone send me the URI for the product edit page, so I can make sure I have the right page and then detect if I am missing something.

Thanks

Joe

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Can't see how to add stock to a SKU

the product edit page is where you upload and edit your products Eye-wink Log in as admin and browse to one of your products. There should be an "edit" tab up at the top there. Or go to /admin/content/node/ and edit a product from there. Make sure the UC Stock module is enabled and also the Stock Manager With Attributes (the latter is not part of UC core - you will have to download and install it separately).

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
Hi, Thanks for your reply. I

Hi,

Thanks for your reply. I am using Version 6 of Drupal and am logged in as User 1. I have UC Stock module and Stock Manager With Attributes enabled. I have followed the above instructions and read other similar forum posts but still no luck.

E.g. /node/83/edit allows me to edit a product node. However I can only see a 'view' and 'edit' tab at the top of the page and no stock link.

Thinking it may be a permissions issue I tried adding another user and gave full admin access - this did not help.

Any help (PM or forum post) would be gratefully appreciated as it feels like I've been banging my head a against a wall and can't figure out what's wrong.

Cheers

Joe

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
$50 to whoever helps me resolve this...

Hope I'm allowed to offer a bounty!

$50 via PayPal to anyone who can help me add stock. Feel free to PM me or comment to this post.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Hi, Thanks for your reply. I

when you click the edit tab - you should go through to a page with a number of tabs up at the top. One of those should be the stock tab. Can you post a screengrab of what you see when you click the edit tab?

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
Re: Re: Hi, Thanks for your reply. I

I only see 'view' and 'edit' tabs - checkout product-2.png attached.

I'd also attached a screen grab showing the key stock modules I have installed and one of the product view.

Any ideas?

Thanks

Joe

AttachmentSize
product-2.png 45.73 KB
product-1.png 46.71 KB
stock-modules.png 110.34 KB
jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: Re: Hi, Thanks for your reply. I

hmmmm all looks fine to me. Edit your product (/node/83/edit) and stick stock on the end of the address in the browser like so:

/node/83/edit/stock

Which should take you to the page where you enter stock levels. What do you see?

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
Re: Re: Re: Re: Hi, Thanks for your reply. I

I can see the /node/83/edit/stock page and add a stock. I think that qualifies for half the bounty Smiling (so far) as I still can't actually use it to do anything.

Ideally I'd like for it not to be hidden but would settle for just being able to use the stock level variable in a custom view. I have attached a screenshot of the product fields I can see when creating a view.

Should I be able to see a stock level field? If so, can you think of any reasons why such fields are being hidden?

The objective is to be able to display products and stock levels as a view.

Thanks

Joe

AttachmentSize
product-stock-level-views.png 61.15 KB
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: Re: Hi, Thanks for your reply. I

I bet your theme isn't printing out the secondary tabs.

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Re: Re: Re: Re: Hi, Thanks for your reply. I

the tab with stock, attributes etc is probably missing because it's not being called in the theme you are using. Switch to Garland and see if it appears. As for adding stock levels into the product view - check this thread out:

http://www.ubercart.org/forum/support/4037/stock_level_product_page

PatW's picture
Offline
Joined: 03/31/2009
Juice: 138
Can't see how to add stock to a SKU

I ran into this just yesterday. I had the Stock tab showing, but my store owner didn't. Turns out he didn't have permissions for uc_stock module - administer product stock.

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
is it possible to add the current stock level as a views field?

Hi Chaps - thanks for the help. It was indeed the theme (efficient)that was not showing the tabs.

Jason, can you PM me your email (PayPal registered) and I will send you the bounty.

The above link looked relevant but slightly dated and doesn't solve the final thing I am after.

is it possible to add the current stock level as a custom views field?

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: is it possible to add the current stock level as a views fie

don't worry about the bounty mate - glad I could help Eye-wink Product stock does not appear as a field in Views (not sure why) so you're not going to be able to create a custom View that uses stock levels.

joelloyd's picture
Offline
Joined: 06/18/2009
Juice: 21
Re: Re: is it possible to add the current stock level as a views

Thanks again for helping, it really is appreciated.

In the end, I decided to put on my mysql and php thinking hat. It's been a while... I used the MSQL query formed by the custom view and added the stock field with a join:

$query= "SELECT node.nid AS nid,
node_data_field_date2.field_date2_value2 AS node_data_field_date2_field_date2_value2,
node_data_field_date2.field_date2_value AS node_data_field_date2_field_date2_value,
node_data_field_date2.nid AS node_data_field_date2_nid,
node.type AS node_type,
node_data_field_date2.field_location_value AS node_data_field_date2_field_location_value,
node_data_field_date2.field_venue_value AS node_data_field_date2_field_venue_value,
uc_products.sell_price AS uc_products_sell_price,
node.title AS node_title, uc_product_stock.stock as stock_value
FROM node node
LEFT JOIN uc_products uc_products ON node.vid = uc_products.vid
LEFT JOIN uc_product_stock uc_product_stock ON node.nid = uc_product_stock.nid
LEFT JOIN content_type_product node_data_field_date2 ON node.vid = node_data_field_date2.vid
WHERE (uc_products.model) = ('PRODUCT-NAME')";
$results = db_query($query);

while($output = db_fetch_object($results))
{

$stock_value = $output->stock_value;
$date = $output->node_data_field_date2_field_date2_value2;
$price = $output->uc_products_sell_price;

}

echo "stock".$stock_value;
echo "date".$date;
echo "price".$price;