themixtapechannel Posted January 23, 2013 Share Posted January 23, 2013 Hello Everyone, Just wanted to post the issue that I ran into today when upgrading from 5.1.5 to 5.2.0. After the upgrade, all of my items were set to (out of stock). I mean, I have thousands of products, and they were all set to (out of stock) after the upgrade. Now when I went to my admin panel and set the (allow out of stock purchases) set to accept. All products were back in stock. I contacted cubecart staff, and they looked into it with no luck on a fix. They claim to think that it may be my vector v5 template from shopdev, or a bug. I wrote to shopdev as well to make them aware of the problem, and haven't herd back yet, so let's see what happens on there reply. I really and sincerely don't think that this is caused by the vector v5 template since I had also switched back and forth to the cubecart standard templates to see if it had to do with a template or fusion issue, and the issue was the same. Then again, this is my personal opinion. Note: As mentioned before I have contacted cubecart staff, as well as shopdev. I'm only posting this here since there's lot's of us that play around with cubecart as I also do, and maybe anyone comes across this issue or can provide some info or help with this issue. I currently had to convert back to 5.1.5 just to avoid this issue, and will keep trying to get this resolved so that I can re upgrade since I'm looking forward, as much as lots of us to using the all in one shipping and more of the new features in 5.2.0. Kind Regards, Eddie Quote Link to comment Share on other sites More sharing options...
Homar Posted January 24, 2013 Share Posted January 24, 2013 Hello Eddie, I believe this to be a bug in the latest CubeCart release. After disabling the Fusion plugin and all of its hooks, line 116 of the cubecart.class.php file still returns false for all products (whether they are in stock or not): $product['ctrl_stock'] = (!$product['use_stock_level'] || $GLOBALS['config']->get('config', 'basket_out_of_stock_purchase') || ($product['use_stock_level'] && $GLOBALS['catalogue']->getProductStock($product['product_id'], null, true))) ? true : false; Digging a little deeper... This line calls the Catalog::getProductStock() method, which is returning empty strings. I can therefore only conclude that this issue is not being caused by either the Vector theme or Fusion plugin. Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Hello Homar, I thank you so much for your help. I had already replied to you via your shopdev ticket. I just new that this had to be a bug since I had also last all day playing with this issue, and no matter what I tried, had the same result. I will try and post this bug for cubecart staff can take a look at it. Thank you once again! Eddie Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2013 Share Posted January 24, 2013 The newer version of CC520 has fixed an issue with Catalogue::productAssign() where a call to Catalogue::getProductStock() was faulty, which returned bad info. Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Hello bsmither, when was this version released, because I had downloaded the latest version up too this afternoon my time, and this issue of returning out of stock products was still happening? Is this newer version on the cubecart download? Thank you! Kind Regards, Eddie Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2013 Share Posted January 24, 2013 I have no idea when this archive was "released". Timestamps in the ZIP file I just downloaded indicate the archive was built at 1/23/2013 11:25am (at whatever timezone Devellion is at) as opposed to the previous archive with timestamps of 1/22/2013 1:41pm. I downloaded (let's call it CC5.2.0.1) about 1/2hr ago, at UTC: Thursday, January 24, 2013 at 02:27am Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Ok bsmither, Then this should be new to me as well. I'll look into it, thanks buddy! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 24, 2013 Share Posted January 24, 2013 Hi, Got the same problem over here. Bug in CC 5.2.0. I guess. Upgraded wednesday jan. 23 on 2 pm GMT+1. I found a temporarily fix: check the "Allow out-of-stock purchases" in the main settings - Stock. Doing this the prices will be back again, That said this bug is still there and I have no clue how to upgrade since I have the latest version installed. Help appreciated. Kind regards, Boudi Quote Link to comment Share on other sites More sharing options...
vit320 Posted January 24, 2013 Share Posted January 24, 2013 Displeasure post about CC 5.2.0 deleted due to extensive use of thinly disguised inappropriate language. You are entitled to express your opinion, but not to use offensive language. Quote Link to comment Share on other sites More sharing options...
stevensonplumbing Posted January 24, 2013 Share Posted January 24, 2013 I have exactly the same problem. Though I'm using standard cubecart skins. Using version 5.2, downloaded fresh from Cubecart this morning (Thursday) Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Hi, yes this bug is still not fixed as of yet. and to KRS1, you will have to revert your version of cubecart back to 5.1.5 until this bug is fixed. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2013 Share Posted January 24, 2013 Would you please verify a couple of observations regarding the Out of Stock scenario: * When viewing the database directly, the 'stock_level' column of the CubeCart_inventory table shows valid numbers? * When viewing the admin screen Product Inventory, the 'Stock' column shows valid numbers? * When editing an existing product, the Stock Level filed shows a valid number? * In admin, Store Settings, Stock tab, set 'Show stock levels' to a green check. Then when viewing the product on the storefront, there is indication that the product is in stock or out of stock? Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Hi, I have already reverted back to 5.1.5, but I can answer these question for you as too my experience with the issue when on 5.2.0. * When viewing the database directly, the 'stock_level' column of the CubeCart_inventory table shows valid numbers? Yes * When viewing the admin screen Product Inventory, the 'Stock' column shows valid numbers? Yes * When editing an existing product, the Stock Level filed shows a valid number? Yes * In admin, Store Settings, Stock tab, set 'Show stock levels' to a green check. Then when viewing the product on the storefront, there is indication that the product is in stock or out of stock? Yes Everything seems correct, but as mentioned before, when on the site, all products show (out of stock). Now keep in mind that if you check green via the admin panel, (allow out of stock purchases) all stock will come back to in stock. As shopdev also concluded, the bug seems to be coming via: I believe this to be a bug in the latest CubeCart release. After disabling the Fusion plugin and all of its hooks, line 116 of the cubecart.class.php file still returns false for all products (whether they are in stock or not): $product['ctrl_stock'] = (!$product['use_stock_level'] || $GLOBALS['config']->get('config', 'basket_out_of_stock_purchase') || ($product['use_stock_level'] && $GLOBALS['catalogue']->getProductStock($product['product_id'], null, true))) ? true : false; Digging a little deeper... This line calls the Catalog::getProductStock() method, which is returning empty strings. I can therefore only conclude that this issue is not being caused by either the Vector theme or Fusion plugin. Sorry, answered this one wrong: * In admin, Store Settings, Stock tab, set 'Show stock levels' to a green check. Then when viewing the product on the storefront, there is indication that the product is in stock or out of stock? Out Of Stock Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2013 Share Posted January 24, 2013 If you can, would you please try this: In /classes/catalogue.class.php, line 756, find:if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { and make it look like: if( ($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where) ) !== false) { Quote Link to comment Share on other sites More sharing options...
themixtapechannel Posted January 24, 2013 Author Share Posted January 24, 2013 Hello bsmither, Thank you very much, but the only problem right now, is that I have reverted back to 5.1.5. I don't have a 5.2.0 at the moment to try this on. I'm so tired of going back and fourth, that I just decided to leave it alone on 5.1.5 until an upgrade or fix was made. Maybe someone will give this a try, or maybe I can do a subdomain test store to try it at a later time since I'm currently in my store and don't have the time to do it at this moment. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 24, 2013 Share Posted January 24, 2013 If you can, would you please try this: In /classes/catalogue.class.php, line 756, find: if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { and make it look like: if( ($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where) ) !== false) { Hi, Does not make a difference on a 5.2.0 version (upgrade from 5.1.5) Regards, Boudi Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2013 Share Posted January 24, 2013 Then try this. In /classes/catalogue.class.php, near line 756, make this: if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { if(!empty($products_matrix[0]['stock_level'])) { $GLOBALS['session']->set('restock_note',$products_matrix[0]['restock_note']); } return $products_matrix[0]['stock_level']; } look like this: if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { if(!empty($products_matrix[0]['stock_level'])) { $GLOBALS['session']->set('restock_note',$products_matrix[0]['restock_note']); return $products_matrix[0]['stock_level']; } } (I really should get a testbed setup and do an upgrade. Run my typical diagnostics.) Quote Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2013 Share Posted January 25, 2013 Then try this. Make: if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { if(!empty($products_matrix[0]['stock_level'])) { $GLOBALS['session']->set('restock_note',$products_matrix[0]['restock_note']); } return $products_matrix[0]['stock_level']; } look like this: if($products_matrix = $GLOBALS['db']->select('CubeCart_option_matrix', $rows, $where)) { if(!empty($products_matrix[0]['stock_level'])) { $GLOBALS['session']->set('restock_note',$products_matrix[0]['restock_note']); return $products_matrix[0]['stock_level']; } } Then I get 2 blank screens, backend and frontend. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 25, 2013 Share Posted January 25, 2013 I just want to thank all those helping with this issue. We have been totally overwhelmed the last few days since the release. I am going to try some of the code changes mentioned here and release 5.2.1 as soon as we have a solution. I'm sorry for the inconvenience caused to everyone. This version had a good two week beta period and this issue wasn't reported. Quote Link to comment Share on other sites More sharing options...
stevensonplumbing Posted January 25, 2013 Share Posted January 25, 2013 We've gone back to 5.1.5 for the meantime. 5.2 did work with the "allow sales of out stock items" option enabled, but we were in danger of selling stock we didn't have. Looking forward to the arrival of 5.2.1 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 25, 2013 Share Posted January 25, 2013 From my testing the following replacement function works very well in the classes/catalogue.class.php file. We will get a minor release made early next week. http://pastebin.com/A2C23HMx Quote Link to comment Share on other sites More sharing options...
Guest Posted January 26, 2013 Share Posted January 26, 2013 From my testing the following replacement function works very well in the classes/catalogue.class.php file. We will get a minor release made early next week. http://pastebin.com/A2C23HMx Unknown paste ID? Quote Link to comment Share on other sites More sharing options...
fairview Posted January 26, 2013 Share Posted January 26, 2013 Hi - I am in the development stage of a site using CC5 and noticed the same problem after upgrading to 5.2.. bsmither, I tried the fix you suggested above to cataloque.class.php, and it didn't change anything on my site - ie products with stock still show the out of stock message on the site. Further, I have the site set to not display the out of stock message (and it does) and to not display products with no inventory but it is still showing everything. hope that helps fix this. Sue Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 26, 2013 Share Posted January 26, 2013 I installed a fresh CC515, then immediately upgraded to (let's call it CC520.1). I do not get an out-of-stock indicator, but even though I set "Show stock levels", the stock level is not showing on the View Product page. Edit: Stupid... I didn't set the "Use stock level" and a fresh install of CubeCart has the Test Product with zero stock. Quote Link to comment Share on other sites More sharing options...
Guest eafacerist Posted January 26, 2013 Share Posted January 26, 2013 I have the same problem,after upgrade all products are Out of Stock.How i revert to 5.1.5 version? My website is http://electromotoare.com 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.