Page 4 - Monthly Archives: 2020
- 1 min read
There are different reasons you would want to remove the currency switcher dropdown from Magento 2 storefront.
For example, you may want to remove it because you use and don't want to allow customers to manually change a currency.
In order to remove the currency switcher dropdown follow these steps:
1. Create a new file inside your storefront theme folder:
app/design/frontend/ThemeVendor/ThemeName/Magento_Theme/layout/default.xml
2. Add this code into it:
<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="currency" remove="true" /> <referenceBlock name="store.settings.currency" remove="true" /> </body></page>
In case you already have Magento_Theme/layout/default.xml file, then edit it and put this code before </body> closing tag:
<referenceBlock name="currency" remove="true" /><referenceBlock name="store.settings.currency"ihor
- 1 min read
There are cases when you want to remove the language switcher dropdown from the storefront.
For example, you may want to remove it because you use and don't want to allow customers to manually change a store view.
It is an easy task to do. Please follow these simple steps:
1. Create a new file inside your storefront theme folder:
app/design/frontend/ThemeVendor/ThemeName/Magento_Theme/layout/default.xml
2. Add this code into it:
<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="store_language" remove="true" /> </body></page>
In case you already have Magento_Theme/layout/default.xml file, then edit it and put this code before </body> closing tag:
<referenceBlock name="store_language" remove="true" />
3. , run CLI command:
bin/magento c:f
That's all :-)
- 1 min read
If you decided to remove , please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
Removing files instruction depends on the way WebP Images extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/WebPapp/code/Magefan/WebPPlusapp/code/Magefan/WebPExtra
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-webp
then run composer CLI command to remove it
composer remove magefan/module-webp*
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Remove Extension Data (optional)
Attention! This will clean all WebP images data, including WebP images rules and configurationsihor
- 1 min read
If you need to update by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the WebP images extension was installed with.
Update using composer
If the WebP images module was installed via the composer (check if vendor/magefan/module-webp folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-NAMEcomposer require magefan/module-NAME ^x.x.x# replace NAME with:# webp - for Basic plan# webp-plus - for Plus plan# webp-extra - for Extra plan# replace x.x.x with the version you want to usephp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Update using archive and FTP
If the WebP images module was installed via FTP (check if app/code/Magefan/WebP folder exists), then follow these commands:
1. Download the latest version of the WebP images extension archive from magefan.com.
2. Extract archive.
3. Make the backup copy of theihor
- 2 min read
You can install by Magefan, using composer or archive installation methods.
Attention! if you install the extension on Magento 2.4.0 there is a known issue in Magento 2.4.0 core "Error: main.CRITICAL: Error: Undefined class constant 'XML_PATH_HEADER_TRANSLATE_TITLE'. So before installing the extension please apply this change to your Magento instance. Note that this fix is already present in Magento 2.4.1.
Installation via composer (recommended)
Please navigate to your Magefan Account > Downloads > Install via Composer to get the composer installation instructions.
Installation using archive and FTP
Download WebP Images Extension ZIP-Archive from magefan.com website (not GitHub or other sources).
Extract files.
Copy app and lib folders from the archive to your Magento 2 folder.
In a command line, using "cd", navigate to your Magento 2 root directory.
Run CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: ifihor
- 3 min read
Modules in the Magento 2 file structure
Module files in Magento 2 are located in 2 directories.
1. app/code/<VendorName>/<ModuleName>/
2. vendor/<vendor-name>/<module-name>/
Vendor Name — is the name of the company/person that developed the module. In some cases, the name of the vendor may coincide with the name of the customer's company. Therefore, before developing a new module, the name should be agreed upon. In the examples, we use our name — Magefan.
Module files developed on order or modules from other companies installed via FTP are located in the app/code folder.
The vendor folder contains root modules, as well as modules installed using the Web Setup Wizard or Composer. You will find the Magento root modules in the vendor/magento folder.
Interesting to know:In the Magento 2 repository (dev branch) on GitHub (https://github.com/magento/magento2), all root modules are in the app code/Magento folder. And all PHP libraries are in lib/internal/Magento.
Thisihor
- 2 min read
To work with phpMyAdmin you need to have the webserver configured. If it is not installed use .
In this article, we will describe 2 phpMyAdmin installation methods:
1. Download phpMyAdmin from the official website.
It is suitable for everyone, regardless of the operating system. To get started, go to the downloads section of phpmyadmin.net and download the archive with the latest available version of phpMyAdmin to your computer.
Once you have finished, place the archive folder in your web directory. For convenience, rename it to "phpMyAdmin".
If you use a local web server, use these links http://localhost/phpMyAdmin or http://127.0.0.1/phpMyAdmin to access phpMyAdmin.
2. Installation from the Ubuntu repository
The second method is useful only for OC Ubuntu users. To install phpMyAdmin:
1. Update the available package data. Run the command:
sudo apt update
2. Install phpMyAdmin. Run the command:
sudo apt install phpmyadmin
During installation, the system prompts you to set which web serverihor
- 3 min read
If you want to set up a web server and look for some tips, this article is for you. Here are instructions for setting up a web server (LAMP = Linux + Apache + MySql + PHP) on OS Ubuntu 20.04, in connection with:
Apache 2PHP 8Mysql Sever 8
To start, go to the CLI (command-line user interface). You can open it with Ctrl + Alt + T combination. If you don't want to set up a local webserver, then you need to connect to your server via SSH.
Once you are on a proper instance in the terminal enter super user mode (root or sudo user). Run the following command:
sudo su
and enter the password to your account, if required.
Take the following steps to install the web server:
1. Update the available package information. Run this command:
sudo apt update
* In the examples, the commands that must be executed by the superuser beginning with the word sudo. You do not have to use sudo while in superuser mode.
2. Install the Apache 2 webserver.
sudo apt install apache2 gedit
3. Install the MySQL databaseihor
- 1 min read
If you decided to remove , please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
Removing files instruction depends on the way CMS display rules extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/CmsDisplayRules
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-cms-display-rules
then run composer CLI command to remove it
composer remove magefan/module-cms-display-rules
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Remove Extension Data (optional)
Attention! This will clean all CMS display rules configurations.
1. Just in case please make aihor
- 1 min read
If you need to update by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the CMS display rules extension was installed with.
Update using composer
If the CMS display rules module was installed via the composer (check if vendor/magefan/module-cms-display-rules folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-cms-display-rulescomposer require magefan/module-cms-display-rules ^x.x.x# replace x.x.x with the version you want to usephp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Update using archive and FTP
If the CMS display rules module was installed via FTP (check if app/code/Magefan/CmsDisplayRules folder exists), then follow these commands:
1. Download the latest version of the CMS display rules extension archive from magefan.comihor
- 1 min read
You can install by Magefan, using composer or archive installation methods.
Installation via composer (recommended)
Please navigate to your Magefan Account > Downloads > Install via Composer to get the composer installation instructions.
Installation using archive and FTP
Download CMS Display Rules Extension ZIP-Archive from magefan.com website (not GitHub or other sources).
Extract files.
Copy app folder from the archive to your Magento 2 folder.
In a command line, using "cd", navigate to your Magento 2 root directory.
Run CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Once you have installed the Magento 2 CMS Display Rule extension you can start the .
