Export E-Commernce Module - Class update not included.

Danny Winbourne asked on November 1, 2021 20:03

I added a new field to the Order Class within the E-commerce Module. When I use the export feature to export this module, the new field is not included. (I opened the zip file, and did a search in the files). I can of course manually create the new field in production but ideally, I'd like to import a package.

It looks like I'm not getting a CMS_class.xml.export file if I export the E-Commerce module. If I export my custom module, this file is included.

Should I be exporting something else apart from the E-commerce module?

Correct Answer

David te Kloese answered on November 3, 2021 10:38

Hi,

updating classes on existing modules is challenging especially on Kentico's own core modules.

If possible just recreating it on the second environment might be safest.

That being said, there is a way!

Although talking about custom modules, the steps mentioned in the following blogs might get you started how and why things work:

Summarizing the steps you need to update the ecom module to set it in development mode: I'd be extra carefull in updating DB's directly!

If you run the following SQL query: update CMS_Resource set ShowInDevelopment = 1, ResourceIsInDevelopment = 1 where resourcename = 'CMS.Ecommerce'

The module is unsealed and you can export it unsealed. As explained in Jeroen Furst's blog you need to keep the module unsealed during export to include the class definitions.

It's important to unclick the checkbox: image

Using this approach I've just expored the cms_class.xml.export of the module that included my custom field.

Again be extra careful on rolling this out, make backups and make sure you test it properly before rollout.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Danny Winbourne answered on November 3, 2021 11:31

Thank you David, that's a very helpful answer. I think I'll make the change manually in this case, as it's only one field.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.