Jump to content

Using Phpmyadmin To Change Usestocklevel


M. Smith

Recommended Posts

I know very little about SQL, but I tried running the following query (that I found on another post):

UPDATE CubeCart_inventory SET useStockLevel = 1 WHERE 0;

But it said Affected rows: 0, and nothing changed.

What am I doing wrong, or better yet, is there an easier way? I see under the Query tab there seems to be some sort of form for piecing together a query, but honestly, I'm afraid to use it since I don't really know what I'm doing. I did backup my database first, but I still don't want to experament and have to restore data.

Thanks! :)

Link to comment
Share on other sites

You're VERY close.... WHERE 0 will evaluate to FALSE. WHERE 1 will evaluate to TRUE. So try this:

UPDATE CubeCart_inventory SET useStockLevel = 1 WHERE 1;

That will enable stock level for all products...but this is the default. I see more often that people don't want to use stock level but it's defaulted enabled for all new products. So to unset it for all products, use this bit of SQL:

UPDATE CubeCart_inventory SET useStockLevel = 0 WHERE 1;

Good luck! And remember to ALWAYS backup your store before mucking around directly in your database.

:sourcerer:

Link to comment
Share on other sites

Thank you, Sir William! That worked perfectly!

I know that stock levels enabled is supposed to be the default, but in my last mass import it was disabled for some reason. I'm not really sure why, since it had never done that before, but CC seems to have a mind of its own sometimes.

No biggie, though. It's still a great program. :)

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...