Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Sonni Tost 20 posts 72 karma points
    Apr 07, 2014 @ 15:56
    Sonni Tost
    0

    Categories can still be shown after deletion

    Hi everybody,

    We have a client who has been running uCommerce for a while. This week-end a customer ordered a product from a category that was deleted eight months ago. The product had not been in other categories.

    The category does not show up in the category tree - but when we search for products that we know were placed in that category then they show up as active products in the deleted category in the backend.

    Furthermore the categories have been indexed by search engines - and when we type in deleted category names and the site name - the search engines still find the pages with the categories - and ucommerce can still show the deleted categories.

    How can we avoid this behaviour in the future? Perhaps set DisplayOnSite to false - Save - and then delete?

    And how can we fix this for the remaining categories that have been deleted - but still holds and displays obsolete products? I cannot reach the categories from the uCommerce administration.

    Kind regards,

    Sonni T.

  • Martin 181 posts 740 karma points
    Apr 08, 2014 @ 17:27
    Martin
    101

    Hi Sonni,

    uCommerce are using a concept of "softdeletable" which means some entities are still existing in the database just with their "Deleted" column set to 1. As I recall categories are a part of this. You can just create a new category with the exact same name and perhaps the same place in the structure (if you can remember) and uCommerce should be reusing the one from the database.

    You should also be able to just change the status directly in the database but in that case I would take a backup before changing anything directly if you're not familar with uCommerce entity model :)

     

    Best regards Martin

     

    Edit: A possible fix can be checking whether a category has been deleted before showing it. If it's deleted you can send the user to a 404 page instead or do some url redirecting depending on how you want to handle it.

  • Sonni Tost 20 posts 72 karma points
    Apr 10, 2014 @ 09:25
    Sonni Tost
    0

    Hi Martin,

    Thank You for your input. I ended up making a check on the category / product before showing it - and then redirect the user to a 404 if the product was placed in a deleted category.

    Kind regards

     

    Sonni T.

Please Sign in or register to post replies

Write your reply to:

Draft