Post by jooy123 » Mon Jan 27, 2020 9:24 pm

I have cloned my OC 2.3.0.2 shop before but this time I seem to have broken it. I don't want to start from scratch since I adjusted the new shop already (e.g. new products, pics, etc.).
I emptied all tables in the database:
orders*
AND
customers*

I learned later hat I am not supposed to empty order_status. So I dropped this table and imported it from my old shop. But the shop is still not working.
It works perfectly on the surface. Frontend (shop) and backend (admin) both work. I can use the shop and create orders.
But

1. Order emails never arrive (no error, no error log, confirmation that order was successfully submitted).
2. I was suspecting a mail php problem but contact emails arrive and php mail works fine
3. Despite having ordered and/or registered. I have zero orders and zero customers in the database.

Any ideas?

New member

Posts

Joined
Sat Apr 15, 2017 12:42 am

Post by xxvirusxx » Mon Jan 27, 2020 9:32 pm

Restore the back-up (if you have a back-up).
If you don't have, then contact hosting to restore for you.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jooy123 » Mon Jan 27, 2020 9:49 pm

It is another shop. I cloned my old shop into it and changed the products and description etc.
It would be a stupid idea at this point to "restore" the backup. I think I may just have to restore some selected DB tables.
The question is WHICH ONES?
Out of DB_orders_* and DB_customers_* which ones am I not supposed to empty?

New member

Posts

Joined
Sat Apr 15, 2017 12:42 am

Post by xxvirusxx » Mon Jan 27, 2020 9:57 pm

jooy123 wrote:
Mon Jan 27, 2020 9:49 pm
Out of DB_orders_* and DB_customers_* which ones am I not supposed to empty?
Both...if you want to have customers on you store....and orders.
And yes, is a stupid idea to restore from backup only if the store was cloned and products was added in same day/hour/hours and if server doesn't made backup.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jooy123 » Tue Jan 28, 2020 12:53 am

xxvirusxx wrote:
Mon Jan 27, 2020 9:57 pm
jooy123 wrote:
Mon Jan 27, 2020 9:49 pm
Out of DB_orders_* and DB_customers_* which ones am I not supposed to empty?
Both...if you want to have customers on you store....and orders.
I am not sure you are serious here. Do you know the difference between "empty" and "drop"? The tables are still there.
xxvirusxx wrote:
Mon Jan 27, 2020 9:57 pm
And yes, is a stupid idea to restore from backup only if the store was cloned and products was added in same day/hour/hours and if server doesn't made backup.
If I restore from backup then the complete shop reverts to the 1st shop. I don't want this. I don't see a reason why I can not import single tables from the other shop if need be.

New member

Posts

Joined
Sat Apr 15, 2017 12:42 am

Post by xxvirusxx » Tue Jan 28, 2020 2:58 pm

You understand very hard.....

Example:

- You made a clone at 10:00 AM
- You have added products and finished at 14:00 PM
- Server made a backup at 14:10 PM of you clone (entire Cpanel)
- You have emptied that two tables after 14:10.

I this case you have a backup to restore you cloned shop...

If the server doesn't have a backup before, you need to fix from another source.

And if you can't fix yourself you can:

- start again from beginning
- post on Commercial section for paid help.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jooy123 » Wed Jan 29, 2020 1:44 am

xxvirusxx wrote:
Tue Jan 28, 2020 2:58 pm
You understand very hard.....
No. I is pretty simple. I emptied the tables before I added new products. Have you ever worked with SQL? ::)

It is easy to just import the emptied tables from the old shop (more then two, as I am sure you are aware of the OC DB structure). But could you please give me a reason why this should be necessary?

I just found this information: viewtopic.php?t=204371
This gives a decent overview about WHAT tables should have been emptied. The other ones I will reimport from the old DB.

New member

Posts

Joined
Sat Apr 15, 2017 12:42 am

Post by straightlight » Wed Jan 29, 2020 2:02 am

Your database tables are synced with sessions if using DB sessions by default on your platform. If you're not careful with them, you could break one to multiple data relationships also depending on the mount of extensions that you have despite if you have simply emptied the database or not. There are ways to do it and needs to be done the right way. Simply indicating that you've emptied the database with rolling eyes isn't enough, since a database might simply be about tables, fields and values but it's also about structures and structures can be corrupted at times.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Wed Jan 29, 2020 2:37 am

jooy123 wrote:
Wed Jan 29, 2020 1:44 am
I emptied the tables before I added new products. Have you ever worked with SQL? ::)
Emptied by mistake or what?
I have worked with SQL for bulk products add, prices.. and more..

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jooy123 » Wed Jan 29, 2020 4:03 am

xxvirusxx wrote:
Wed Jan 29, 2020 2:37 am
jooy123 wrote:
Wed Jan 29, 2020 1:44 am
I emptied the tables before I added new products. Have you ever worked with SQL? ::)
Emptied by mistake or what?
I have worked with SQL for bulk products add, prices.. and more..
No. Obviously deleted on purpose. I needed a new but similar shop and it is easier to clone the shop, as I have done many times in the past.
I don't need the old orders and customers anymore. In fact, I think customers would not be amused if they realize that they already have an account in another shop. Yes, I know that I can delete orders and customers in the backend but if you have >10.000 customers this is not a realistic option.

The cloned shop works now. I copied the missing data for some tables from the old shop. I will now carefully test what tables I can empty to get rid of old customers and data.

New member

Posts

Joined
Sat Apr 15, 2017 12:42 am

Post by xxvirusxx » Wed Jan 29, 2020 4:47 am

jooy123 wrote:
Wed Jan 29, 2020 4:03 am
I will now carefully test what tables I can empty to get rid of old customers and data.
Then empty all customer tables except customer_group and customer_group_description.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Wed Jan 29, 2020 5:01 am

Take note that the customer transaction table could also contain order IDs. Carefully looking into this table before any removal would be highly suggested.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: dcortex and 409 guests