Copied to clipboard

Flag this post as spam?

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


  • Phil Dye 149 posts 325 karma points
    Aug 15, 2017 @ 08:09
    Phil Dye
    0

    Deleting old carts

    Is there a correct way to purge/delete old carts (eg older than X days)? We have a site with a couple of million carts, and this is making for a large database.

    I can delete the rows from the database directly easily enough, but is there a "more correct" way of doing this, eg a method in the API?

    Phil

  • Anders Burla 2560 posts 8256 karma points
    Sep 04, 2017 @ 09:25
    Anders Burla
    100

    Hi Phil

    The "right" way is to use the API to get orders and then .Delete() them. Use a DB reader to get the id's of the orders to delete. Then use OrderService.Instance.Get to get multiple orders and then delete them using the API.

    Then a scheduled task calling a Surface controller would be the way to do it :)

    Kind regards

    Anders

Please Sign in or register to post replies

Write your reply to:

Draft