Data Migration between carts


Just wondering if anyone has a workflow for working with a development, staging and live version of cs-cart. Here is some information about my setup.

  • I have an installation of cs-cart ultimate. I am a web developer working on a website for a business.
  • so far we have the development version under version control and that is working ok.
  • I have a separate database for development, staging and live.
  • development is running on my localmachine
  • staging and live site and databases are being hosted on joyent

    The sorts of changes my client is likely to make is:
  • Add content pages to the site
  • Modify and add new products

    As a developer, I will be doing things like:
  • Modifying CSS
  • Creating addons
  • Adding new code to the website.

    So anything under version control, I don't think I will have any trouble migrating with GIT. That is fine. I guess where I start to struggle is figuring out what to migrate between the databases.

    For example, if I change the block layout for a page on staging and my client is happy with that. How do I merge the block layout to live without over writing the entire live database. Is there a reference somewhere where I can figure out what tables or data from tables to migrate across?


You can export the “block manager” to an XML file and then import it into your production site. This will address your layout synchronization. You'll have to manually move the css.

For other things like content pages or adjustments to products, there is no easy way to ensure that your changes get pushed to your production site. If you do this regularly, you might be able to stay in sync, but odds are you'll either push something you didn't intend to or you'll miss something you wanted.

Content pages are relatively easy. There's the cscart_pages and cscart_page_descriptions tables. But for things like product features, filters, and addon data, everything is linked across several tables. Miss something and you're really hosed.

cs-cart is not really setup to be a staged deployment. It is geared toward the small merchants who want to edit as they go. They have a concept of “REVSIONS” but it is undocumented and only seems to apply to product revisions.

Be interested in what you come up with though…

ok, great, thanks. Thats interesting.

Yes, I thought about writing some migration scripts. But I would imagine these could only be version specific.

To circumvent any potential issues, after the initial launch, I think I will get the client to make changes on the live site to content. He is a client who likes to fiddle around, so modifying the live site directly is against my better judgement, but I don't see how I can work it otherwise in the short term. Maybe in the long term I can figure something else out.

Then if I write new code for the site I will push that through version control and maybe just work with the block manager as you suggested to migrate layouts. Its not like I will be writing a new payment method everyday, so I can migrate things like that manually.