Nick F Posted April 29, 2013 Share Posted April 29, 2013 Hi, I've done an upgrade to 5.2.2 directly from the previous version and the webshop admin guys at work has noticed that on the product invetory page the Stock colum has now gone. The boys used that as a quick and easy way to keep a current eye on the stock level per product. They could also click the little breadcrumb triangle thingy and sort by the stock level colum. I found that single page very usefull when keeping an eye on the webshop from my phone as i travel out of the office as that product inventory page told me everything i need to know from one glance - from stock to what the boys had been changing / adding and when. Is this just an upgrade glitch as i think the upgrade took a few attempts to auto update or has it this stock coloum been dropped for some reason does anyone know? i've include a picture of our shop with the stock colum gone after upgrade. On the plus side we really do like the new shop and its paid for its self already in its low costs and ease of use. We upgraded from the free version of V3 and after a few years of running that we find the V5 does everythign we need, version 5.2.2 php ver 5.3.23 my sql ver 50168 thanks Nick. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 29, 2013 Share Posted April 29, 2013 My Stock column is gone, too, on 5.2.2! Maybe it's because of the Options stock count changes. But our estates 5.2.2 store does not have any options and likely never will. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 29, 2013 Share Posted April 29, 2013 I found it's been commented out in 5.2.2 admin/skins/default/products.index.php AND admin/source/product.index.inc.php, which maybe makes sense if you're using the Option Matrix. But it worked for me when I took the comment code off, because I do NOT have any options on my estates store. Quote Link to comment Share on other sites More sharing options...
korpen Posted May 6, 2013 Share Posted May 6, 2013 Same - annoying - problem for me! The "Stock Level" column is important and VERY useful in our business (+900 products). Please: any solutions? Quote Link to comment Share on other sites More sharing options...
Guest lil-redrex Posted May 28, 2013 Share Posted May 28, 2013 Same issue for us, frustrating not having it there since going 5.2.2. Very handy for quick check of stock levels. I have reported it as a bug in the bug tracker. Will see how it goes. Should be shown even if using product options etc. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 28, 2013 Share Posted May 28, 2013 Should be shown even if using product options etc. When the Option Matrix is set up, the Stock Level on the General tab of the product is set to zero, and the stock levels are on each option. Therefore, showing the stock level on the Product Summary screen would show the stock level as zero, IF you use Options. Quote Link to comment Share on other sites More sharing options...
duckmansweb Posted July 25, 2013 Share Posted July 25, 2013 yep ive noticed this to , im starting to dislike CC 5.2.2 , is their a quick hack to bring the stock level back ? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 25, 2013 Share Posted July 25, 2013 I found it's been commented out in 5.2.2 admin/skins/default/products.index.php AND admin/source/product.index.inc.php, which maybe makes sense if you're using the Option Matrix. But it worked for me when I took the comment code off, because I do NOT have any options on my estates store. The code is fixable easily enough in these two files - just take the comment code off - BUT it won't work if you use Option Matrix stock control on items. So I use it on one site, but not on another. Quote Link to comment Share on other sites More sharing options...
duckmansweb Posted July 30, 2013 Share Posted July 30, 2013 i found the comment code in "products.index.php" , on line 38 Change: <!--<th nowrap="nowrap">{$THEAD.stock_level}</th>--> To: <th nowrap="nowrap">{$THEAD.stock_level}</th> i cannot in "product.index.inc.php" where to modify ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 30, 2013 Share Posted July 30, 2013 There is also an edit a bit further down: <td>{$product.product_code}</td> <td>{$product.price}</td> <td align="center"><span class="editable number" name="stock_update[{$product.product_id}]" title="{$LANG.common.click_edit}">{$product.stock_level}</span></td> <td>{$product.updated}</td> This will add the ability to update stock levels from the listing. In product.index.inc.php, find near line 580, this: #: Product Clone :# Scan upwards until you find this: $GLOBALS['cache']->clear(); httpredir(currentPage(array('delete'))); } Replace whatever is between these two end points with: if (isset($_POST['status']) && is_array($_POST['status']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Status */ foreach ($_POST['status'] as $product_id => $status) { $GLOBALS['db']->update('CubeCart_inventory', array('status' => $status), array('product_id' => $product_id)); } $status_updated = true; } if (isset($_POST['stock_update']) && is_array($_POST['stock_update']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Stock Levels */ foreach ($_POST['stock_update'] as $product_id => $stock_level) { $GLOBALS['db']->update('CubeCart_inventory', array('stock_level' => $stock_level), array('product_id' => $product_id)); } $stock_updated = true; } if($status_updated || $stock_updated) { $GLOBALS['cache']->clear(); httpredir(currentPage()); } This will database the new stock levels. When getting the products for the list, the stock_level will be available -- if it was recorded when the product was added to the database. Quote Link to comment Share on other sites More sharing options...
duckmansweb Posted July 30, 2013 Share Posted July 30, 2013 hmm tried that , as per usual ive broken it lol , just gets blank screen at /admin.php?_g=products ive attached my two files "products.index.php" is good im pretty sure , its just the other file products.index.inc.phpproducts.index.php Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 30, 2013 Share Posted July 30, 2013 In product.index.inc.php, find near line 580, this: #: Product Clone :# Scan upwards until you find this: $GLOBALS['cache']->clear(); httpredir(currentPage(array('delete'))); } Replace whatever is between these two end points -- which, in a stock, unedited file, is: if (isset($_POST['status']) && is_array($_POST['status']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Status */ foreach ($_POST['status'] as $product_id => $status) { $GLOBALS['db']->update('CubeCart_inventory', array('status' => $status), array('product_id' => $product_id)); } $GLOBALS['cache']->clear(); httpredir(currentPage()); } with: if (isset($_POST['status']) && is_array($_POST['status']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Status */ foreach ($_POST['status'] as $product_id => $status) { $GLOBALS['db']->update('CubeCart_inventory', array('status' => $status), array('product_id' => $product_id)); } $status_updated = true; } if (isset($_POST['stock_update']) && is_array($_POST['stock_update']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Stock Levels */ foreach ($_POST['stock_update'] as $product_id => $stock_level) { $GLOBALS['db']->update('CubeCart_inventory', array('stock_level' => $stock_level), array('product_id' => $product_id)); } $stock_updated = true; } if($status_updated || $stock_updated) { $GLOBALS['cache']->clear(); httpredir(currentPage()); } Also, in the template file, the second edit, there is a open bracket that got in to my post above somehow. That needs to be removed. It is removed in the post above. Quote Link to comment Share on other sites More sharing options...
DanaKuperr Posted September 16, 2013 Share Posted September 16, 2013 I do not find it "$ GLOBALS ['cache'] -> Clear (); httpredir (CurrentPage (Array ("delete"))); } " Where else can he lie? I am now working on the project planning software, and you must configure the application under it! Quote Link to comment Share on other sites More sharing options...
fabianw Posted October 1, 2013 Share Posted October 1, 2013 Same issue in the latest script version 5.2.3. Please help. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 1, 2013 Share Posted October 1, 2013 Open the file /admin/sources/products.index.inc.php for editing, and go to line 580. Line 580 is: #: Product Clone :# Lines 567-569 is: $GLOBALS['cache']->clear(); httpredir(currentPage(array('delete'))); } So, the code that is between these two locations is: if (isset($_POST['status']) && is_array($_POST['status']) && Admin::getInstance()->permissions('products', CC_PERM_EDIT)) { /* !Update Status */ foreach ($_POST['status'] as $product_id => $status) { $GLOBALS['db']->update('CubeCart_inventory', array('status' => $status), array('product_id' => $product_id)); } $GLOBALS['cache']->clear(); httpredir(currentPage()); } Replace this code with what is given in post #12. If you cannot find the code as stated at lines 567-569 and line 580, then you are not looking at the correct file. Quote Link to comment Share on other sites More sharing options...
fantastichearts Posted October 5, 2013 Share Posted October 5, 2013 I am getting the date appear in the stock column and nothing in the Last updated column. Any ideas. I have done what you said in post 15 and what was said in post 9. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 5, 2013 Share Posted October 5, 2013 And post#10? Quote Link to comment Share on other sites More sharing options...
fantastichearts Posted October 5, 2013 Share Posted October 5, 2013 That worked. Quote Link to comment Share on other sites More sharing options...
Eugene_S Posted November 1, 2013 Share Posted November 1, 2013 I do not find it "$ GLOBALS ['cache'] -> Clear (); httpredir (CurrentPage (Array ("delete"))); } " Where else can he lie? I am now working on the project planning software, and you must configure the application under it! Mm...curious, can't find it either. working on Birdview projects site and all Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.