Best way to upgrade plugin


Currently I am on 1.6.0 version of Algolia Plugin and I want to make an upgrade to the latest version.

The problem I am facing is that I have done a lot of modifications to instantsearch.phtml as well as autocomplete.phtml.

Please suggest an upgrade path.


1 Like

Hello @harshmaur,

it’s definitely a good thing that you decided to upgrade the extension, but first I need to say it’s not going to be easy process as there were a lot of changes made to the extension since version 1.6.0. It will most probably require a lot of manual work.

The changes made to an extension you can find in the extension’s change log or on releases page. Each change is linked to it’s pull request where you can inspect changed files and the exact changed code.

The biggest impact on the upgrade will have the changes which are marked as BC Break - those are the changes which breaks backward compatibility and you’ll need to take a special care about those changes.

The biggest change made to the extension and is related to your modified files is that those files were split into multiple template files and multiple JS files. So you’ll need to see your changes you made to those files, find correct new files (templates or JS) and transfer the change there in order to keep your current functionality.

The other big change is that the directory structure of the extension changed in order to follow standard Magento directory structure. So probably the files you’ll need to update and apply your changes there will be located in different folders.

So as the first step I’d download the latest version of the extension and compare your template files with the new template and JS files of the extension. Then I’d apply those changes to proper files and replaced the old extension by the new one.
Then I’d do proper testing on the local / staging environment and fix / apply changes which were lost during the transition.

Hope it helps.

If you need more details, feel free to ask.