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

Thread: Soft Delet & Unpublish

  1. #1
    guptaat is offline Member
    Join Date
    Feb 2007
    Posts
    51

    Default Soft Delet & Unpublish

    Noticed there are three different ways one can prevent an item from showing up ononline.

    1. UnPublish
    2. Delete which is essentially Soft Delete
    3. Nuke which is Hard Delete

    Nuke or Hard Delete actually removes the item/record from the database so it cannot be recovered.

    Unpublish is probably just a flag that application looks up to see if it needs to display/print the item online.

    Soft Delete is probably again just a flag i.e. marked for deletion which seems like works similar to Unpublish.

    Now question is what is actually the difference between Unpublish and Soft delete. Where should each be used and what is each suited for?

    I hope I am making sense and able to ask my question clearly.
    Thx
    Amit

  2. #2
    nicka is offline Junior Member
    Join Date
    Jul 2007
    Posts
    23

    Default Soft Delete

    Good question, I've always wondered about that too...
    AspDotNetStorefront ML 7.0.0.5
    No Source Code

  3. #3
    estephen is offline Senior Member
    Join Date
    Apr 2006
    Location
    Dallas
    Posts
    208

    Default

    It's a matter of perspective.

    A delete is typically something you never intend to use again. The only purpose of a soft vs. a hard delete is to allow you to recover from an inadvertent mistake. Hard deletion allows you to conscientiously permanently remove something from your database. Either way, deletes are deletes and should not be used simply for the purpose of controlling what appears in the UI.

    Publishing on the other hand allows you to control when something is visible or not. This is helpful to temporarily remove something from the site that you expect to be available again, or also in staging some site content rollout. For instance, maybe you have Manufacturer XYZ that is coming online next week, so you can preload all of their data and be ready to flip the switch at the appropriate time. Or perhaps you have a category called "Christmas Specials" that you only show during Nov/Dec every year. You can unpublish it during the other months but it's still there next November when you are ready to use it again.

    Technically speaking, the [soft] delete flag is not much different from the publish flag in that both are just flags that control the data picked up by the SQL in various cicumstances.

  4. #4
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    RE: "A delete is typically something you never intend to use again. The only purpose of a soft vs. a hard delete is to allow you to recover from an inadvertent mistake."

    correct, we ONLY do a soft delete so a developer can recover from an accidental deletion, but it really means (to the storefront) that that data is deleted, never to be used/shown again.
    AspDotNetStorefront
    Shopping Cart

  5. #5
    joe.jones is offline Junior Member
    Join Date
    Aug 2008
    Posts
    5

    Default What Happens to the items in the a user's cart

    Hi,
    If you unpublish or soft delete an item what happens if a customer has that item in their cart?
    Thanks
    Joe

  6. #6
    akeller is offline Member
    Join Date
    Dec 2008
    Posts
    78

    Default

    I hate to necro this thread but how do you recover the product after a soft delete? The online manual states; "If the product needs to be restored in the future, a developer or DBA can set the "Deleted" field for that product in the Products table in your database to 0. "

    I have done this but my product will not appear in the manager. What else do I need to do?

  7. #7
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    You just need to execute an update query against the product table in the DB and set the field Deleted = 0. Usually it won't appear instantly specially if your enabling CacheMenus to true... you need to do a 'Reset Cache' first in the admin to take effect or switch CacheMenus value from true/false to have the software recreate the stored cache.

  8. #8
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Or, you could make use of this query:
    Code:
    UPDATE Product SET Deleted = 0, Published = 1 WHERE Deleted = 1

  9. #9
    jbaydoun is offline Junior Member
    Join Date
    Sep 2010
    Posts
    1

    Default how to nuke a category

    How to you nuke a item in the Category? this is a child to a parent category? I only see publish or un publish.
    Thanks
    Jen