Jump to content

Upgrade From 5.1.5 to 5.2.0 Set All My Items To Out Of Stock


Recommended Posts

I made the edit described in post #17 and I now see the stock level (Show stock levels enabled) as opposed to "This product is currently out of stock".

 

But this is only one the View Product page, I'll need to verify the other pages to make sure they operate correctly.

Link to comment
Share on other sites

Guest BeautyOnline

Any updates on this? I have the same issue for a client whom I am moving to 5.2.0. The pastebin link above with the proposed code changes does not work and the only current work around is to 'allow out of stock purchases' set to yes which is not ideal.

 

Just as a side note, the installation for my client to Cubecart 5.2 was a fresh install with only the customers, orders and inventory tables imported into a clean 5.2.0 database. It was not an upgrade over the old 5.1.x database. 

Link to comment
Share on other sites

Guest BeautyOnline

Worked like a charm. Thanks for your help.

 

Don't suppose you would have any idea why the images would not be showing after a transfer? I have checked the database and also had a programmer check the database and the file paths for the images are fine and the images are where they are supposed to be in cubecart. I have rebuilt the images, cleared caches, etc. Still no luck.

Link to comment
Share on other sites

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.

 

Hi Bsmither,

 

Since you are confident that this should work I did your steps again and....it worked! (I probably deleted an extra '}' that's why I got a blank screen). But your solution works!

 

Thank you.

Link to comment
Share on other sites

Guest BeautyOnline

Fixed the problem. My client had some 'issues' with their previous database, so instead of just upgrading the database to 5.2.0, I only pulled across certain tables from the database (i.e. images, inventory, site documents, categories, orders). By doing this, after contacting Cubecart support, they informed me that their were issue with the image file id's. All fixed now though.

Link to comment
Share on other sites

Today I upgraded from 5.0.7 to 5.2.0 and had all sorts of issues like

Store settings all missing 
The License and Removal keys were absent causing a 'Cube Cart Lite' error
All products were out of stock!

 

I have re-added the settings and used the fix provided by bsmither to sort the out of stock issue

 

Still testing!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...