How to install the Snelstart extension using Composer


Stapsgewijze Installatie van Magento 2 Extensies via Composer
Naast het handmatig installeren van Magento 2-extensies via SSH of via de Marketplace Wizard, is installatie via Composer een zeer populaire en zelfs de eenvoudigste en veiligste manier om een extensie te installeren.
In dit artikel geven we een stapsgewijze instructie over hoe je een Magento 2-extensie via Composer op de website kunt installeren. Let op: deze handleiding is alleen bedoeld voor extensies die direct in onze store zijn gekocht.
Verkrijg de gegevens
Log in op je account om je Composer Authenticatiesleutels en Inloggegevens op te halen, deze worden automatisch gegenereerd na aankoop van een van onze extensies.
Je kunt ook nieuwe Composer-sleutels aanmaken met een beschrijving, bijvoorbeeld als je van omgeving of sleutels wilt wisselen.
Backup (optioneel maar aanbevolen)
We raden sterk aan om de installatie eerst in een ontwikkelomgeving te testen voordat je deze live zet. Zorg er ook voor dat je een volledige back-up van je webshop hebt, zodat je indien nodig kunt terugrollen. Meer informatie over het maken van back-ups en het terugzetten ervan vind je hier.


Voeg de Magmodules Composer-repository toe via SSH
De volgende stap is het toevoegen van de packages.magmodules.eu
-repository aan je Composer-bestand.
Repository toevoegen via SSH
Via een SSH-verbinding hoef je alleen het onderstaande commando uit te voeren vanuit de Magento-installatiemap. Op deze manier maak je verbinding met onze privé-repository.
composer config repositories.magmodules composer https://packages.magmodules.eu/
Na het uitvoeren van dit commando verschijnt er een lege regel en zijn de repositories succesvol toegevoegd aan je composer.json
-bestand.
Als je de Composer-repository handmatig wilt toevoegen, bekijk dan je account voor de exacte commando’s.


Extension Installation
Once the repository is added to the composer.json file, you can now install the packages that are available through it. If preferred, enable the maintenance mode, see the last part of this section.
Download extension
To download the extension to your store, execute the following command:
composer require magmodules/magento2-snelstart
After executing this command the first time, the username and password of the Composer Auth Keys will be asked and can be obtained here.
Install extension
After that the extension is successfully downloaded, start the setup of the Snelstart koppeling extension by running this commands:
php bin/magento module:enable Magmodules_Magmodules/SnelStart
php bin/magento module:enable Magmodules_AccountingBase
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Now you've successfully executed the right commands and the extension is successfully installed, it's ready for configuration. Navigate to Stores ⇨ Configuration ⇨ Magmodules ⇨ Snelstart koppeling and Accounting to start the configuration.
Maintenance mode
You may want to enable the maintenance mode when installing or updating the module, especially when working on a production website. To do so, run the two commands below before and after running the other setup commands:
php bin/magento maintenance:enable
# Other setup commands
php bin/magento maintenance:disable


Update and Remove extension
It's also possible to easily remove, update and update to a specific version using the following commands:
To update the extension to the latest version, use the command:
composer update magmodules/magento2-snelstart
composer update magmodules/magento2-accounting-base
If you want to update another version, not the latest version of the extension use the command:
composer require magmodules/magento2-snelstart: version
composer update magmodules/magento2-accounting-base:version
To remove the extension, use the command:
composer remove magmodules/magento2-snelstart
composer update magmodules/magento2-accounting-base