I'm in the process of moving a Cartthrob powered EE1.x/Cartthrob 1.x store to EE2.x and Cartthrob 2.x. Most things have gone as smoothly as can be expected with such a big leap (ie not that smoothly, but I'm getting there!)

One issue I'm struggling with is migrating my product options now that they're handled differently. Cartthrob's new (stored option) solution is really good, but I don't know how to bulk-apply my old per-item price modifiers to the new method, as it looks like every item with a stored option saves it as some kind of unique (encrypted?) string. So I don't think it's a case of me writing a sql query to look for serialized arrays in the corresponding field_id and replacing them with a new string.

Has anyone got any experience of this or can think of a handy solution that doesn't involve me manually opening and closing hundreds of entries? Because at teh moment I'm only working on a staging DB - when my update is ready, I'm going to have to migrate the production database and that's going to be tricky in itself... :/

  • Did you run Cartthrob's EE1-2 updater at the start of the process? Because it seems to have code included for unserializing price modifier data. – Tyssen Apr 28 '13 at 2:23
  • I'm 95% sure I did as the rest of the store is working... but I can't be 100% as it was a couple of weeks ago! :) I'm not sure how that part of the upgrade would work as the new modifiers are stored as global options rather than on a per-item basis. – BellamyStudio Apr 28 '13 at 6:31
  • It sounds like you didn't run the updater module, since the updater module automatically converts CT1 price modifier fields to CT2 format. I have a copy of the updater if you need it, just shoot me an email: info at robsanchez dot com. – Rob Sanchez Apr 28 '13 at 12:36
  • Also posted a gist here of the script you'd need to run to convert them yourself. gist.github.com/rsanchez/054aa0970de0410a3e43 This is copied straight from the updater module. – Rob Sanchez Apr 28 '13 at 12:36
  • Fantastic, I'll check this out right now - thanks Rob! =D – BellamyStudio Apr 28 '13 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.