Install And Update M2 Extensions From Amasty Composer Repository [+NEW Info]

Table of Content

Install And Update M2 Extensions From Amasty Composer Repository [+NEW Info]

Hello to Amasty blog readers!

Today we're announcing the availability of Amasty extensions for Magento 2 in our official repository, from which you can now install our modules with the help of the Composer.


Get your free PDF guide on how to install or/and update extensions using composer!

Only Amasty extensions for Magento 2 are available via the repository. Right now, Magento 1 extensions from Amasty are not available there.

 

Why we are opening the official Amasty repository

The decision to develop this opportunity was made because a lot of Amasty clients asked for this option to have some additional installation and updates safety, as well as the convenience of maintaining the extensions. For advanced users, it's a new option to install or update the extensions via the command line, which is fast and hassle-free.

What is more, with this option we're solving a common problem some of our clients faced when buying Amasty extensions for Magento 2 from Magento Marketplace.

Before, if the user had installed the extension from the Marketplace, and then installed the new version obtained from Amasty.com website (using the package manually, not via the Composer), he or she would lose all the settings. Now this issue is solved, because you can use the Amasty repository for updating extensions, and this way no extension settings are lost now.

How to install extensions from Amasty repository via Composer

The following instruction assumes that you have already installed and set up the Composer tool. If you haven't installed it yet learn how to do it here.

To work with Amasty Composer you need to create a Customer Account on Amasty.com (to get Access Keys).

Step 1. Log in to your server via a Command line:

log in to your server via a command line in magento

Step 2. Set the directory where you would like to install the extension. Usually, for such purposes, the Magento root folder is selected.

set the directory where you would like to install the extension in magento

Step 3. Connect to the Amasty Composer Repository:

[php]composer config repositories.amasty composer [/php]

In the path indicate:

  • https://composer.amasty.com/community/ -  for community extensions.
  • https://composer.amasty.com/enterprise/ - for enterprise extensions.

Step 4. To get authorized use generated in your Customer Account :

Amasty.com → Account → My Access Keys

use generated in your customer account in magento

Use the Public Key as a login and the Private Key – as a password.

NEW: How to save Access Keys?

You can save the keys in the repository so you won’t have to get authorized every time.

For this:

#1. Save the keys manually in the repository;
#2. Go to your Magento docroot directory to insert: composer config --auth http-basic.composer.amasty.com $COMPOSER_AMASTY_USERNAME* $COMPOSER_AMASTY_PASSWORD**

*$COMPOSER_AMASTY_USERNAME - your Public Key
**$COMPOSER_AMASTY_PASSWORD - your Private Key

Step 5. After the authorization is successfully finished, you can start installing/updating your modules.

First, take a look at the module names in your Customer Account to make sure you call the necessary module via the Composer correctly.

Please go to Amasty.com → Account → My Downloads for paid extensions and open the My free products tab for free modules.

my free products tab for free modules in magento

You will find module names for the Composer in the 'My Composer Packages' section.

my composer packages in magento

Step 6. To install the module, please execute the following command:

[php]composer require amasty/color-swatches-pro [/php]

to install the module, please execute the following command in magento
Instead of the 'color-swatches-pro' please specify the module you need.

Step 7. To install the module execute the command:

[php]php bin/magento setup:upgrade [/php]

to install the module execute the command in magento

Extension Update via Composer

1. The extension update process is the same as the module installation process. To update the extension, simply execute the command:

[php]composer update [/php]

Instead of the 'composer_name' please specify the corresponding module name which is indicated in your customer account. This command updates only the last two version numbers: e.g. 1.x.x ( only x.x will be updated).

To update the version from 1.x.x to 2.x.x you need to execute the following command:

[php]composer require ^x.0.0  - -update-with-dependencies[/php]

Where x corresponds to the first version number. For example, to update the Improved Layered Navigation Extension for M2 from the 1.x.x version to the 2.x.x version you need to execute the command:

[php] composer require amasty/shopby ^2.0.0  - -update-with-dependencies[/php]

2. To update all modules execute the command:

[php] composer update [/php]

to update all modules execute the command in magento

Delete Extensions via Composer

To delete the extension via Composer, please execute the command:

[php] composer delete [/php]

Instead of the 'composer_name' please specify the corresponding module name which is indicated in your customer account.


Do you have any questions? Feel free to ask them in the comments section. Also, if you're experiencing troubles with this way of installation, feel free to drop a line at [email protected], we'd love to help you right away!

July 2, 2019
July 8, 2019
June 25, 2019
Comments
Pieter
August 17, 2017
Nice, this is really good step forwards, no longer having to keep an eye open for updates, just run 'composer update' and be done with it, very nice! I do have a question though: we as an agency sometimes buy an extension multiple times using the same account, because sometimes multiple clients of ours want the same extension. But as far as I can see, these new access keys for authenticating against your composer repo aren't restricted to certain orders, it's for all the extensions of the entire account. So this means that one client of ours can potentially have access to modules which we bought for another client of ours. Even if we generate multiple access keys, this won't solve it, correct? What do you recommend of working around this? On Magento's Marketplace we create a new account for every client of ours, should we do the same over here? It will become quite tedious to maintain all these accounts at our end I'm afraid, but if that's what we have to do, then so be it :) If you have other recommendations of solving this issue, feel free to let us know :) (All of the above is speculation, I just read this post, but haven't actually tested it out yet.) Thanks!
Reply
Alena Dalidovich
August 18, 2017
Hello, Pieter, Thank your for pointing out the problem! You are absolutely right, at the moment you'll have to create a new account for each new client. But we promise to develop and elegant solution for customers who purchase our extensions for multiple clients in the near future.
buralan
September 10, 2017
thank you very much
Reply
Bryan Veloso
September 18, 2017
Hello Ksenia. Why Amasty M2 modules are way more expensive than their M1 counterparts. Is it really that hard to develop a new module for M2? O__O
Reply
Alina Bragina
June 27, 2019
Hi, Bryan! Thanks for your question. Well, it’s hard to compare, Magento 1 and Magento 2 are too different. We develop new mods for Magento 2 considering new CMS opportunities and new requirements. So we can not just change the cod a little bit. This is the whole part of the work that we should do from the very beginning to provide you the best extensions and the best service. And don’t forget, if you feel like the price is too high for you, you can log in to your <strong><a href="https://amasty.com/customer/account/login" rel="nofollow">Amasty account</a></strong> to see if you have any store credit. Or feel free to subscribe to the <strong><a href="https://amasty.com/" rel="nofollow">Amasty newsletter</a></strong> to receive information about special offers timely. If you have any other questions, I will be happy to help!
Jonas
July 12, 2019
Hi! I can't install one page checkout!! Can you help me, please?!
Reply
Polina Litreyeva
July 12, 2019
Hello, Jonas! Please, try to clean Composer cash. If the problem is not solved, feel free to send all the details to our support team at <a href="mailto:[email protected]" target="_blank" rel="noopener nofollow">[email protected]</a>. They’ll be happy to help you with this.
Matias
July 18, 2019
I had updated all my plugins so quickly! Thanks to this post!
Reply
Polina Litreyeva
July 18, 2019
Hi, Matias! We are glad to be helpful!
Bogdan
August 21, 2019
Hi, I see an issue in your instruction. We should use "--auth" option and I see "–auth". I think we need to fix it in the article. Thanks.
Reply
Polina Litreyeva
August 23, 2019
Hello, Bogdan! Thanks for your careful reading. We have already corrected it.
Guest
October 29, 2019
0.5
Reply
aisha buhari
February 29, 2020
Very good article post. Much thanks again. Fantastic.
Reply
Polina Litreyeva
March 2, 2020
Hello, Aisha! Thanks for your feedback! We're glad to be helpful.
Joe Benton
March 16, 2021
Nice article, will be helpful 4 people who don’t want to waste their time cause it rly helps to instlall/update modules fast
Reply
Vladimir Derachits
March 16, 2021
Hi, Joe. Thank you for reading and sharing your opinion. We are glad to be of service to you.
Leave your comment

Your email address will not be published

This blog was created with Amasty Blog Pro

This blog was created with Amasty Blog Pro