Monthly Archives: August 2021
Hello there, Magento fans!
Are you ready for the final summer updates from Magefan about the new module release, dozens of new features and improvements?
Then let’s go!
Solved: Package exists in composer repo 1 and composer repo 2 which has a higher repository priority
When you install some new extension package in Magento 2 via the composer you can get an error:
[InvalidArgumentException]
Package vendor/module-name exists in composer repo (https://repo.packagist.org) and composer repo (https://repo.magento.com) which has a higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
This error message is self-explaining and contains a link to the composer documentation.
The problem is that a module you try to install has an old version in the Magento composer repository and a new version in the free public packagist.org repository. However, the Magento repository has a higher priority and that is why composer cannot install the latest version and throws this error.
What you need to do to solve the issue is to:
Magento displays floating prices when you configure multi-currency for different countries or set up discounts. In both cases, prices are displayed with decimals which is not very appealing.
So, to make prices more "clean" and provide a better shopping experience you should round off prices in Magento 2.
Usually, you'll have to do this programmatically, but not with the Magento 2 Currency Switcher. Except for switching currency automatically based on customers' geolocation, this tool provides multiple rounding algorithms.
However, before we configure this option, don't forget to configure currency rates.
To round off prices in Magento 2:
- Go to Stores > Configuration > Magefan Extensions > Auto Currency Switcher.
- Enable the Round Prices options and
- Select the Round Algorithm.
You can choose any from the available algorithms:
Round (16.3 -> 16.00, 16.5 -> 17.00)
Ceil (16.3 -> 17.00, 16.5 -> 17.00)
Round 10 (14.3 -> 8.00, 17.5 -> 20.00)
Ceil 10 (14.3
If you decided to remove contact our team for a free consultation in case you have any issues with Magefan's extension.
, please follow the steps below. You canRemove Extension Files
Removing files instruction depends on the way Facebook Pixel extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/FacebookPixel
app/code/Magefan/FacebookPixelPlus
app/code/Magefan/FacebookPixelExtra
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-facebook-pixel
then run composer CLI command to remove it
composer remove magefan/module-facebook-pixel
*
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands
If you need to update Magento 2 Facebook Pixel by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the Facebook Pixel extension was installed with.
Update using composer
If the Facebook Pixel module was installed via the composer (check if vendor/magefan/module-facebook-pixel folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-NAME
composer require magefan/module-NAME ^x.x.x
# replace NAME with:
# facebook-pixel - for Basic plan
# facebook-pixel-plus - for Plus plan
# facebook-pixel-extra - for Extra plan
# replace x.x.x with the version you want to use
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
If you want to upgrade to Plus or Extra, check this guide on how to upgrade Facebook Pixel plan.
Update using archive and FTP
If the Facebook Pixel module was installed via FTP (check if app/code/Magefan/FacebookPixel
You can install Magento 2 Facebook Pixel by Magefan, using composer or archive installation methods.
Do you want us to install the Facebook Pixel extension for you? Let our technical engineers do it – check out our installation service.
Note: if you want to install the Facebook Pixel Plus or Extra please navigate to your Magefan Account > My Downloads > Install via Composer to get the composer installation instructions.
Installation via composer (recommended)
- Open command line.
- Using command "cd" navigate to your Magento 2 root directory.
- Run CLI commands:
composer require magefan/module-facebook-pixel
# Authentication required (repo.magento.com)
# Get your Magento Marketplace authentication keys or use these:
# Username: 7c018006799466c681ad507e27904677
# Password: 289077c86e811661a8f7751828485d3a
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment,