buzzworm Posted October 28, 2016 Share Posted October 28, 2016 (edited) Hi, I'm running PS 1.6.1.7, without Advanced Stock Management. I'm trying to clean up and recover after a failed attempt to enable Advanced Stock Management so that I can try again later. I seem to have bad entries in my ps_warehouse table and am not sure if I should manually delete them from the database, since I can't delete them using the back-office. Background: I tried connecting a Point-Of-Sale program that integrates with Prestashop. This program automatically enabled Advanced Stock Management. However, once it was enabled, all my stock was 0 and "unavailable" on my site. It was a "panic" situation and I quickly disabled Advanced Stock Management. I remember having to manually restore quantity to our products after turned it off. I don't remember the exact sequence of events but after a couple failed attempts to get the POS program working with Advanced Stock Management, I was left with three warehouses in the database. However, two appeared to have incomplete data. I was unable to delete the incomplete warehouses because Prestashop would give me an error, something like "cannot delete warehouse". I exported my database from phpMyAdmin into a SQL file and here's what it has for the ps_warehouse table: INSERT INTO `ps_warehouse` (`id_warehouse`, `id_currency`, `id_address`, `id_employee`, `reference`, `name`, `management_type`, `deleted`) VALUES (1, 1, 929, 1, 'WAREHOUSE-1', 'Warehouse 1', 'WA', 1), (2, 1, 0, 0, NULL, 'Warehouse 1', 'WA', 0), (3, 1, 0, 0, NULL, 'Warehouse 1', 'WA', 0); I'm afraid to delete the "bad" records for fear of causing other database problems. So I created a test instance of my store to test my data cleanup plans, and imported the database export file into my test Prestashop store. However, after import, only one warehouse row was created, and the data is different from the file that I imported: INSERT INTO `ps_warehouse` (`id_warehouse`, `id_currency`, `id_address`, `id_employee`, `reference`, `name`, `management_type`, `deleted`) VALUES (1, 1, 5, 1, 'Warehouse 1', 'Warehouse 1', 'WA', 1); Now I'm confused! 1) I thought that exporting my database, and importing into my test database, would yield and exact copy of my data in my test store, but it didn't 2) Now I'm unable to test deleting the bad warehouses My ultimate goal is to "practice" setting up and using Advanced Stock Management on my test instance so that I can confidently get it working on my production store. Thanks for any help! Edited October 28, 2016 by buzzworm (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted October 28, 2016 Share Posted October 28, 2016 it is often more simpler to move forwart than to fallback. also it's best to use a dev copy of shop to try new things... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now