(Solved) Can deleted items be removed?

Comments

7 comments

  • Avatar
    Chris Muench

    You would have to execute sql statements to remove items. NOTE: If there are any sales this will break them as they wouldn't reference any items anymore.

    You would need to use phpMyAdmin or other tool if you are using download version. If you are using cloud verison you would need to open a ticket

    SET FOREIGN_KEY_CHECKS=0;
    TRUNCATE TABLE phppos_items;
    TRUNCATE TABLE phppos_inventory;
    TRUNCATE TABLE phppos_inventory_counts_items;
    TRUNCATE TABLE phppos_items_taxes;
    TRUNCATE TABLE phppos_item_kits;
    TRUNCATE TABLE phppos_item_kit_items;
    TRUNCATE TABLE phppos_item_kits_tier_prices;
    TRUNCATE TABLE phppos_item_kits_taxes;
    TRUNCATE TABLE phppos_location_items;
    TRUNCATE TABLE phppos_location_items_taxes;
    TRUNCATE TABLE phppos_location_items_tier_prices;
    TRUNCATE TABLE phppos_location_item_kits;
    TRUNCATE TABLE phppos_location_item_kits_taxes;
    TRUNCATE TABLE phppos_location_item_kits_tier_prices;
    SET FOREIGN_KEY_CHECKS=1;

  • Avatar
    SterlingH

    Chris, thank you for your response. What purpose does the Cleanup Old Items serve? I was under the impression that it would remove the Item IDs for use again.

  • Avatar
    Chris Muench

    It removes the UPC + Product ID from deleted items so they can be re-used

  • Avatar
    SterlingH

    One last question, does your SQL query remove all items or just deleted items?

  • Avatar
    Chris Muench

    It removes all items. If you want jus deleted you would need to only run these queries

     

    SET FOREIGN_KEY_CHECKS=0;

    DELETE FROM phppos_items WHERE deleted = 1

  • Avatar
    SterlingH

    Do I need to 

    SET FOREIGN_KEY_CHECKS=1;

    after the two other queries?

  • Avatar
    Chris Muench

    no

Please sign in to leave a comment.