The Complete Guide to eCommerce Development 2024

Re-Installing Add-Ons to Keep Store Available: Tips from Developers

How to Update Add-Ons

Today we are having an interview with experts from our Add-Ons Development Department: Anastasia and Alex. Those are the people who carefully process your requests for add-ons and help you to resolve any kind of problems with them. As add-on upgrading is the most common and most store-affecting issue with our customers, we dedicate this post to this topic. But before we begin with the interview, let’s introduce some theory behind add-ons upgrade.

An add-on upgrade is done:

  • After bug fixes;
  • After adding new features;
  • If a new version of an addon is released for a new version of the platform.

You can upgrade an add-on by:

  • Replacing an individual file;
  • Replacing all files without uninstalling the add-on (uninstallation);
  • Completely replacing all addon files (full re-installation);
  • Referring to the Upgrade Center.

Each method has its pros and cons, but regardless of the chosen way, a person doing the upgrade (except for cases when upgrading with the Upgrade Center) needs to know the platform very well and have at least minimal technical knowledge in order not to harm the operation of the entire store.

Partial replacement

Replacing specific files is the fastest way to make changes. It usually applies to bug fixing. For example, sometimes it is enough to replace func.php or .tpl templates to solve the problem. However, if the version of the add-on installed in your store does not match the current version, then replacing one or more files may not only help you with error rectification, but add new troubles or even disable the entire store. In that case, you’ll see conflicts raised between old and new files. You may experience popping-up various PHP Notices in your logs. Some pages may become inaccessible due to a PHP Error.

PHP Notice: Undefined index: vendor_ids
PHP Notice:  Array to string conversion in /var/

Pros and cons:

Fast.

This method should be done with developers to avoid mismatching parts of the code and conflicts between the old and new versions.

Upgrade without re-installing

This option is used when multiple problems arise with the add-on. For example, both in functionality and design.

When replacing add-on files, one should keep in mind that:

  • Files responsible for the add-ons functionality are located in the folders of the installation archive: app / addons / add-on-name and js / addons / add-on-name
  • Files responsible for the backend view are located in the folders of the installation archive: design / backend
  • Files responsible for the add-on storefront view are located in the folders of the installation archive: var / themes_repository / responsive

When transferring files responsible for the add-on storefront view, you need to transfer them to the design / themes / theme-name folder.

In addition to replacing files, you should also delete irrelevant files. Here you will have to manually compare the add-on installation archive with the add-on files in your setup. This usually applies to controllers, hooks (app / addons folder), and templates.

You should not replace the file app / addons / add-on-name / addon.xml to avoid problems with uninstalling or reinstalling the add-on in the future. After replacing or deleting files, you should clear the installation and templates and browser caches.

Pros and cons:

When an add-on is upgraded using this method, the data created with the add-on, settings, etc., will remain intact.

This method cannot be used to add new functionality to an add-on, as there may be problems with the database and language variables (both are regulated by the addons.xml file, which is active only when installing/reinstalling/uninstalling the add-on in the admin panel).

Full re-installation

If you need to upgrade to a newer version, then a complete removal of the add-on is required in order to install it again.

When fully re-installing an add-on:

  • Remove the add-on in the admin panel.
  • Manually delete the add-on files from the directories:
    • app / addons;
    • js / add-ons (if any);
    • design / backend;
    • var / themes_repository / responsive.
  • Clear cache.
  • Download the new add-on archive.
  • Install the add-on.

Pros and cons:

With this method, you are guaranteed to receive new functionality of the add-on and correction of previous errors. 

However, when re-installing the add-on, all data with settings, additional pages, additional images (banners, galleries), mail and notification templates, will be removed. After re-installing the add-on, you will need to recreate them from scratch.

Read more about the manual upgrade…

Interview with Add-On Development Experts:

How often are addons upgraded and what are the most frequently updated ones?

Anastasia: You need to do an upgrade at least once a new version of the add-on is released for a new version of the platform. With the platform upgrade, the default functions that can be used in add-ons may change. Problems may arise due to the broken dependencies between the old version of the add-on and new version of the platform. We keep track of such changes and promptly release a new version of the add-on.

Also, we advise upgrading the add-on after the release of bug fixes. Such upgrades come out regularly when problems are found.

When adding new functionality, the upgrade is recommended, but not required. With the upgrade, you can get more advanced add-on functionality.

Upgrades are released every 2 weeks as part of the Scrum development methodology.

Alex: Recently, as the refactored version of the add-on has been released, we’ve got lots of requests for Product Labels to upgrade. The thing is that sometimes our customers ask to upgrade it while keeping their labels, certain records from the database. In this case, a separate transfer of such records to the new version of the add-on after the upgrade is required.

What are the main problems with the upgrade and how do you solve them?

Alex: There are no problems in the process of replacing files itself. Difficulties arise before the upgrade. Basically, it is difficult to agree with the client about the nuances of the upgrade and then get feedback. Most often, our customers say that everything is OK and vanish after receiving the upgraded add-on. It is important for any developer, and for us in particular to receive feedback and know that our work was useful. This motivates us to work even better to exceed expectations.

There may be some difficulties with data transfer. All records are stored in the database, and when the add-on is upgraded, changes occur in queries to the database. The new version of the add-on may call the fields with data from the old table, that doesn’t have such fields. This causes the add-on to fall down.

If the add-on is old and a new version is required, it may be necessary to add new fields or columns to the database. It is required to adapt the table for the new version of the add-on. In this case, we have to contact the platform developer with a request to provide such fields, which can take some time.

During the upgrade,the optimization process takes place: some files are deleted and others are added. At the same time, old files from the add-on of the previous version may remain, which causes conflicts with the new version. Developers see such files and delete them. But you need to be well versed in the code to do this. Otherwise, you can delete the wrong records, and the storefront will become inaccessible.

How often do customers come after an unsuccessful self-upgrade with a request to fix bugs?

Anastasia: It’s quite often when customers refer to us just after an unsuccessful self-upgrade. As a rule, updating through the Upgrade Center does not cause problems and does not require programming experience or any technical knowledge. This is the safest method that never leads to conflicts with older versions. After we make improvements or fix bugs in add-ons, we make an upgrade package that allows you to upgrade without conflicts. Difficulties begin when the store owner, not a developer, tries to upgrade an add-on by overwriting the old version with the new version. For example, there is some add-on version 4.3. The customer wants to upgrade to 4.10 and manually installs the new version. The result is the version conflict. If at the same time, the upgrade was carried out on a live store, then the scale of the consequences is even more serious: the storefront goes down. Developers have to clean up old files and re-install the correct version.

Tell us about successful cases when the add-on upgrade really helped?

Anastasia: We’ve got lots of them. I usually gather success cases to motivate our developers. Here are the latest ones:

Our customer has upgraded the add-on from version 4.3.8.4 to version 4.10.0.4 by installing the new version over the old one, which is an incorrect way to upgrade. As a result, when the add-on was enabled, the store did not work and the notice “Service Unavailable” was displayed. Our developers cleaned the add-on files on the server and installed the latest current version. The problem had been solved. The feedback from the client was laconic 🙂 “I checked it all. That’s perfect!”

JSON-LD for SEO

The customer reported a problem – the settings for the global Identifier were not displayed and the Brand was not added to the product page. It turned out that the reason for this was the old version of the add-on. After the upgrade, the issue has gone away.

Product Labels

One of our customers addressed us with incorrect add-on operation. Labels were not displayed right on Unitheme. The reason was the outdated version of the add-on installed by the customer. After refreshing the plugin to the latest current version, where the add-on was adapted to Unitheme, the problem was resolved.

MailChimp Ecommerce

Once, there was an issue with an unsuitable version of the add-on in the online store, which made it impossible to connect the store to its MailChimp account. After the upgrade via the Upgrade Center to the version of the add-on that was suitable for the store, the MailChimp Ecommerce add-on began to work correctly.

Closing

Of course, you save time when doing upgrades by yourself. There is nothing complex in upgrading with the ready-to-use upgrade packages available through the Upgrade Center. We always recommend this way of refreshing your add-ons. But, when you need to replace individual files, keep some customized code, and add a new function, please make sure that you or your team make things right. Otherwise, don’t put your business at risk. Our developers are always ready to help you with upgrading add-ons.

Share: