How To Upgrade Addons?

I do not see a function anywhere to upgrade addons. When there is a new version of an addon and I upload the files by ftp, then what do I do? How does the new xml get loaded to update the functionality?



In most e-commerce software and forum software there is an upgrade function for addons, but in CS-Cart this seems to be missing.

I have found out that there is no upgrade function. To upgrade addons one should uninstall the addon and then install the new version.

However, for some addons this means loosing all data on uninstall. This can be pretty disastrous if the addon holds data for all your products.

On the other hand there are also addons do not remove the associated data on uninstall which means your database gets polluted with old data from former addons.



In other words: because CS-Cart's upgrade function for addons is missing there will be problems no matter how the addon developer handles upgrades.

Yes, there is no upgrade function for addons. As a solution, you can correct 2 addon.xml files of the old and new versions of the module.


  1. Delete all uninstall DB queries in the installed add-on
  2. Delete all install DB queries in the new version of the module



    It will save your data.

Thank you for this information. If the new version introduces new functions or different approaches then doesn't this require db queries?



Removing code from the xml files is not really a feasible option for the average user.

Been an issue since the get-go and why we invested in automatic upgrades and upgrade installation (including backup of the old).



However, I would bet that almost anything they come up with would not be viable for all addons and all developers. The developer is the best one to provide and support an upgrade strategy for their clients and their addons.

[quote name='tbirnseth' timestamp='1409251006' post='190975']The developer is the best one to provide and support an upgrade strategy for their clients and their addons.

[/quote]

Apparently thats not happening in many cases. And its understandable. Until addon upgrades are supported by CS-Cart this will remain an issue.

Or you can choose addons from developers that can and do support upgrades… That would be my preference! :-)

There’s a reason why cs-cart re-releases their addons with each release and why their addons are provided for within the core upgrade process…

I think that add-ons upgrade should be centralized and made via marketplace. But at the moment, marketplace product is just description and link to the site of the module owner. Hope they will improve the marketplace in the future. As far as I know, they have such plans, but without any ETA (as usual)

I am happy that I have daily backups setup. If I wouldn't then this would have been a nightmare and massive data loss.

they have an opportunity here to request requirements from addon developers instead of sitting the ivory tower and casting out their edicts to the masses. However, given this opportunity in the past, they don't take advantage of it.

Are you saying that you have an addon for version 4.x of cs-cart and when you upgraded cs-cart to version 4.y that the addon destroyed data in your cart? That would seem to mean that the addon is more of a 'mod' than an 'addon'. Did it modify core-files in its installation?

If a v4 addon adds any data. For example add a product tab where users can add data (questions, product data, shipping restrictions, whatever, or a blog addon) then that data should be removed from the database on uninstall. Because otherwise it will leave data in your database after the product is uninstalled. I find it logical that addon developers have the uninstall process remove all associated data.

When that same addon is uninstalled and reinstalled with the intention of upgrading then the data will be lost while there should not be lost with an upgrade.

I am lucky that I caught this issue only after uninstalling one addon. I could easily restore a backup and then review the rest of the addons one by one.

Hmm… I really think that what actions to take on uninstall varies by add-on. Loosing historical data so you can install a new version will really piss people off. Especially if it is queued or pending data or complex config info.



Shouldn't have to uninstall to update. CSS-cart also blew it in v4 by importing tables for addons that they know were not compatible.