Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Update inventory via SQL

  1. #1
    Vegarari is offline Member
    Join Date
    Nov 2006
    Posts
    35

    Question Update inventory via SQL

    Is there a way to update inventory via SQL?
    There are a couple issues in 8.0.1.2 where Related Items and Upsell Items do not display if the inventory is zero or less.

    App Config
    HideProductsWithLessThanThisInventoryLevel = -1
    tried 0 as well

    We do not use/sync inventory so just want to set all products inventory to say 10,000. We have over 3K products and do not have time to do by hand.

    Any help and/or comments on this are appreciated

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    Considering you are not using the Inventory field. Then yes a SQL statement like the one below would do the job.

    C#/VB.NET Code:
    UPDATE dbo.ProductVariant SET Inventory 10000 
    Hope this helps.

  3. #3
    Vegarari is offline Member
    Join Date
    Nov 2006
    Posts
    35

    Thumbs up

    I just tried it on our local test database and it worked perfectly!

    Thank you very much mmcgeachy!