0

I need to export some CT order/customer data from a live site to a staging site (updated EE and add-ons), is there a reliable way to do this?

Live site running EE v2.9.3 and CT v2.70 Staging site running EE v2.11.3 and CT v2.71

Import/Export of EE data seems to be generally a bit of pain from what I have read elsewhere.

2 Answers 2

1

For a simple EE to EE migration (within v.2 at least) there's no need for Datagrab et al, just export the SQL tables that you want and import into the other database.

1
  • Thanks James, didn't realise it could be that simple.
    – Wes
    Commented Jan 16, 2017 at 21:02
2

For data import, I highly recommend using AJW datagrab with CSV data. http://brandnewbox.co.uk/products/details/datagrab

data export is a little bit trickier, but you can setup a template to output to CSV/XML or you can use a plugin like Zenbu Studios Hokoku to setup exports directly from the admin CP (if you use Zenbu).

If you want to setup CSV output and file download via a template you can use a plugin like http header to set the content disposition. Check out the http header plugin here: https://github.com/rsanchez/http_header

While the above plugins and methods work great for nearly all EE data, CT order data works a bit differently - specifically order_items/item_options. Item options are stored in the db as base64 encoded data and must be serialised or unserialized as needed. via php:

unserialize(base64_decode($data));

you may be able to serialize your data for item_options prior to export and then import it directly, but I have not tried doing so and cannot vouch for an easy way to handle it. However, if you are simply using the basic item_options tags (e.g., size, S M L XL; color: red,green,blue etc.) you may be able to work directly with that data via datagrab. Item_options becomes much more complicated if you are using many custom options.

1
  • Thanks for the detailed answer, I thought that CT would be the more difficult data to handle.
    – Wes
    Commented Jan 16, 2017 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.