ATTENTION: this article is not assumed to be a guide for necessary actions. Cart-Power team does not bear any responsibility for the possible damage caused by following the instructions in this article. Any changes described in this article are done by CS-Cart users at his/her own risk. We strongly encourage you to contact technical support team to upgrade the add-ons.
When should I upgrade the add-on?
Usually, it is needed to upgrade the store when:
- There are some bug fixes are done
- The new functionalities are added to the add-on
- The new version of the add-on is released for the new version of CS-Cart platform
How can I upgrade the add-on?
There are several possible methods to upgrade (or renew) the add-on:
Each way has its own advantages and disadvantages. They are described below. Also, we use some time frames in the descriptions. These periods are not the obligatory (they are just the rough examples) and can differ for some add-ons. You should clarify these questions with the add-on developer anyway. These methods do not require the in-depth technical knowledge but the person, who makes this modification, should be experienced enough in CS-Cart operation. If you are not sure, that you can make all necessary changes by your own, please, contact the developer of your add-on. Yes, the upgrade of the add-on by the developer can cost some money, but you will be sure that an add-on will work correctly, that all data will be in safety. When you make changes on your own, some errors may take place and after that, you spend more money and time to fix the problems with the help of the support department. If you want to upgrade the add-ons of Cart-Power team, you can contact us here.
ATTENTION: Always make the full backup of your store and the full backup of your database before upgrading the add-on.
On the one hand, it is the easiest way to change one or two files in the add-on to apply changes. Usually, it works only while bug fixing. Sometimes, it is enough to change the func.php or a .tpl file to solve the problem. But on the other hand, if the add-on in your store is not equal to the latest version of the add-on, the replacement of some file can corrupt the correct the site working, not solve the existing one. You may get some PHP Notices or even PHP Fatal errors. It is a very individual process, please, contact the developer regarding the ability of such replacement. This method can be used by those who just purchase, download and install the add-on (approximately, 2 weeks or even less). Contact your add-on developer and ask what files should be replaced to solve the problem.
Files that determine add-on functionality are located in app/addons/addon_name and js/addons/addon_name directory
Files described appearance of the add-on in the administration panel are here: design/backend
Files corresponding to the appearance of the add-on in the storefront are saved in the var/themes_repository/responsive directory or in the var/themes_repository/basic directory.
Please, note, that in the live store the files of the storefront design are located in the design/themes/your-active-theme directory, for example, in design/themes/responsive. And you should add files from the var/themes_repository/responsive directory of the installation package to the design/themes/your-active-theme directory of your installation.
This option can be used if there are several issues with the functionality or appearance to be fixed in case the add-on was downloaded and installed a few weeks ago. This time period should be verified by the addon developer.
While replacing files, please, take in account the following information:
- files that determine add-on functionality are located in app/addons/addon_name and js/addons/addon_name directory
- files described the appearance of the add-on in the administration panel are here: design/backend
- files corresponding to the appearance of the add-on in the storefront are saved in the var/themes_repository/responsive directory or in the var/themes_repository/basic directory.
When you change files for the storefront appearance, please, put them into the design/themes/your-active-theme directory.
Except replacing the files you also should check that your installation does not contain any needless files. You should manually compare the structure of the add-on in your installation and the installation package. Sometimes it is necessary to remove the unnecessary controllers and hooks (that are located in app/addons/addon_name) or templates.
Moreover, it is forbidden to replace the app/addons/addon_name/addon.xml file to avoid problems with the removal or uninstallation the add-on in the future.
When you update the add-on in this way, all add-on information (product combinations, pages, blocks, etc.) and settings will be saved.
After removal or replacing the file, you should clear the cache of your installation and templates and also the cache of your browser.
Please, note, this method can’t be used to add the new functionality to the add-on because it may cause different problems with the database and language variables. These things are described in the addon.xml file and changed only when you install/uninstall the add-on within the administration panel.
When you uninstall the add-on and install it again with the new package you get for sure the new functionality and solving problems BUT during the uninstallation, all add-on data (settings, objects, product combinations, pages, images, templates, etc.) are removed from your database. It means that after installation you will have to set up the add-on and objects from the beginning. There is one workaround* described in the end of the article, but it works correctly in 50% of cases.
- Uninstall the add-on in the administration panel: Add-ons > Manage add-ons
- Remove the add-on files from the following directories:
- js/addons (if any)
- var/themes_repository/basic (if any)
- Clear the cache of your installation and templates and browser cache
- Download the new add-on installation package
- Install the add-on according to the instructions here
- Set up the add-on and content again (add galleries, creates blog articles, combine product into the packages, and do anything that add-on is supposed to do).
* Uninstallation of the add-on without losing the add-on data
The part of the code related to the removal (addition) of the fields and tables to the database is at the end of the app/addons/addon-name/addon.xml file. This code is between queries tags. The structure of the code and of the addon.xml file is described in the official CS-Cart documentation
In order not to loose the add-on data you can temporarily remove the code between queries tags, save changes, re-install the add-on and after that it is vitally important to add the code back to the addon.xml file. ATTENTION: the existing add-on data will not be removed BUT the new data, for example, new fields or tables also will not be created. It will probably cause problems with the add-on functionality. In the logs you will see messages like “missing column in the database table” or sth like this. In this case you will have to add the missing data to the database manually in any convenient way: PHPMyAdmin, adminer.php script, cpanel, etc.
This method can be used only by experienced users of CS-Cart acquainted with working in the database. See more at: https://cart-power.com/add-on-re-installation-in-cs-cart/#sthash.sWpOpEWO.dpuf