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 5 of 5

Thread: Size/Color Inventory Orphan Records

  1. #1
    RBrun is offline Member
    Join Date
    Nov 2008
    Posts
    45

    Default Size/Color Inventory Orphan Records

    Is there a "proper" way to clean up orphaned records in the Inventory table?

    Over the past couple of years, it has been a practice here to remove the size or color from an item when it is no longer available. We're changing our ways on this going forward, but there are currently a lot of records out there detached from their variants.

    Part 2
    We run the store allowing out of stock inventory to be shown, but would like to be able to disable certain sizes or colors without creating the orphans above. As a feature request perhaps we could add a "kill" character to the appconfigs that when found within the size color attributes, would cause that size or color not to be displayed for sale. For example

    Red,Green,!Yellow,Blue

    Yellow would not be displayed in the drop down or variants in table etc.

    Incidentally this all came up because we are using the WSI interfaces for more maintenance and it is working great, but sometimes gives us insight into things we didn't realize were happening....

    Thanks,
    Rob

  2. #2
    RBrun is offline Member
    Join Date
    Nov 2008
    Posts
    45

    Default

    Perhaps if I rephrase the first part of the message above...

    Can I safely delete records on the Inventory table which no longer have a corresponding entry in the Color or Size columns of the matching ProductVariant record?

    Thanks,
    Rob

  3. #3
    Mike The Last Boyscout is offline User
    Join Date
    Nov 2008
    Posts
    254

    Default

    Yes, its safe to delete those. In the next version those items should be cleaned up properly.


    *Please ensure that you have a full, functioning backup before making any code modifications or file changes to your AspDotNetStorefront website, or running any ad-hoc queries against your database. Improperly making code modifications or running queries against your database can cause your website to be non-functional and/or your data to be permanently lost. As part of your disaster recovery plan, you should make regular backups of all files and data, and perform periodic checks to ensure your backups function properly. If you are not sure if your data is adequately protected, contact an IT professional or your hosting provider for assistance.

  4. #4
    RBrun is offline Member
    Join Date
    Nov 2008
    Posts
    45

    Default

    Perfect - Thanks!

  5. #5
    fit2page is offline Junior Member
    Join Date
    Apr 2010
    Posts
    9

    Default Through query

    Can this safely be done through a query? I am trying to create a total stock value overview. The orphaned records are shown in the list so I want to delete them.

    Regards,
    Marc