/
delta

delta

Install Apache server.

First, clean-up yum:

[root@delta ~]# yum clean all

 

Update our packages:

[root@delta ~]# yum -y update

(update 408 packages)

 

Install Apache:

[root@delta ~]# yum -y install httpd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.airenetworks.es * extras: mirror.airenetworks.es * updates: mirror.airenetworks.es Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.4.6-80.el7.centos will be installed --> Processing Dependency: httpd-tools = 2.4.6-80.el7.centos for package: httpd-2.4.6-80.el7.centos.x86_64 --> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-80.el7.centos.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-80.el7.centos.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-80.el7.centos.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed ---> Package httpd-tools.x86_64 0:2.4.6-80.el7.centos will be installed ---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================================================== Installing: httpd x86_64 2.4.6-80.el7.centos base 2.7 M Installing for dependencies: apr x86_64 1.4.8-3.el7_4.1 base 103 k apr-util x86_64 1.5.2-6.el7 base 92 k httpd-tools x86_64 2.4.6-80.el7.centos base 89 k mailcap noarch 2.1.41-2.el7 base 31 k Transaction Summary =================================================================================================================================================================================== Install 1 Package (+4 Dependent packages) Total download size: 3.0 M Installed size: 10 M Downloading packages: (1/5): apr-1.4.8-3.el7_4.1.x86_64.rpm | 103 kB 00:00:00 (2/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00 (3/5): httpd-tools-2.4.6-80.el7.centos.x86_64.rpm | 89 kB 00:00:00 (4/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00 (5/5): httpd-2.4.6-80.el7.centos.x86_64.rpm | 2.7 MB 00:00:00 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 16 MB/s | 3.0 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : apr-1.4.8-3.el7_4.1.x86_64 1/5 Installing : apr-util-1.5.2-6.el7.x86_64 2/5 Installing : httpd-tools-2.4.6-80.el7.centos.x86_64 3/5 Installing : mailcap-2.1.41-2.el7.noarch 4/5 Installing : httpd-2.4.6-80.el7.centos.x86_64 5/5 Verifying : httpd-tools-2.4.6-80.el7.centos.x86_64 1/5 Verifying : apr-1.4.8-3.el7_4.1.x86_64 2/5 Verifying : mailcap-2.1.41-2.el7.noarch 3/5 Verifying : httpd-2.4.6-80.el7.centos.x86_64 4/5 Verifying : apr-util-1.5.2-6.el7.x86_64 5/5 Installed: httpd.x86_64 0:2.4.6-80.el7.centos Dependency Installed: apr.x86_64 0:1.4.8-3.el7_4.1 apr-util.x86_64 0:1.5.2-6.el7 httpd-tools.x86_64 0:2.4.6-80.el7.centos mailcap.noarch 0:2.1.41-2.el7 Complete! [root@delta ~]#

 

Add to start:

[root@delta ~]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. [root@delta ~]#

 

Configure new virtualhost:

For each VirtualHost, add new configuration file, like /etc/httpd/conf.d/website.newshop.costaflores.com.conf

<VirtualHost *:80> ServerName newshop.costaflores.com DirectoryIndex index.php index.html index.htm not-a-file DocumentRoot /var/www/html/magento/ <Directory /var/html/www/magento/> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> CustomLog logs/newshop.costaflores.com.log combined ErrorLog logs/newshop.costaflores.com.error.log </VirtualHost>

 

For the definitive URL https://shop.costaflores.com add a new file configuration /etc/httpd/conf.d/website.shop.costaflores.com.conf

<VirtualHost *:80> ServerName shop.costaflores.com DirectoryIndex index.php index.html index.htm not-a-file DocumentRoot /var/www/html/magento/ #DocumentRoot /var/www/html/static-magento/ <Directory /var/html/www/magento/> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> CustomLog logs/shop.costaflores.com.log combined ErrorLog logs/shop.costaflores.com.error.log </VirtualHost> <VirtualHost *:443> ServerName shop.costaflores.com DocumentRoot /var/www/html/magento/ SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /etc/ssl/certs/costaflores_com.crt SSLCertificateKeyFile /etc/ssl/private/costaflores_com.key <Directory /var/html/www/magento/> Options Indexes FollowSymLinks MultiViews Order allow,deny AllowOverride All </Directory> CustomLog logs/shop.costaflores.com.log combined ErrorLog logs/shop.costaflores.com.error.log </VirtualHost>

 

Firewall Add ports:

[root@delta ~]# firewall-cmd --permanent --add-port="80"/tcp success [root@delta ~]# firewall-cmd --permanent --add-port="443"/tcp success

 

Reload firewall rules:

[root@delta ~]# firewall-cmd --reload success

 

List rules:

[root@delta ~]# su -c 'firewall-cmd --zone=public --list-all' public (active) target: default icmp-block-inversion: no interfaces: eth0 sources: services: dhcpv6-client ssh ports: 80/tcp 443/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: [root@delta ~]#

 

Install Wget:

[root@delta ~]# yum -y install wget Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.airenetworks.es * extras: mirror.airenetworks.es * updates: mirror.airenetworks.es Resolving Dependencies --> Running transaction check ---> Package wget.x86_64 0:1.14-15.el7_4.1 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================================================== Installing: wget x86_64 1.14-15.el7_4.1 base 547 k Transaction Summary =================================================================================================================================================================================== Install 1 Package Total download size: 547 k Installed size: 2.0 M Downloading packages: wget-1.14-15.el7_4.1.x86_64.rpm | 547 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : wget-1.14-15.el7_4.1.x86_64 1/1 Verifying : wget-1.14-15.el7_4.1.x86_64 1/1 Installed: wget.x86_64 0:1.14-15.el7_4.1 Complete! [root@delta ~]#

 

Install unzip:

[root@delta ~]# yum -y install unzip Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.airenetworks.es * extras: mirror.airenetworks.es * updates: mirror.airenetworks.es Resolving Dependencies --> Running transaction check ---> Package unzip.x86_64 0:6.0-19.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================================================== Installing: unzip x86_64 6.0-19.el7 base 170 k Transaction Summary =================================================================================================================================================================================== Install 1 Package Total download size: 170 k Installed size: 365 k Downloading packages: unzip-6.0-19.el7.x86_64.rpm | 170 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : unzip-6.0-19.el7.x86_64 1/1 Verifying : unzip-6.0-19.el7.x86_64 1/1 Installed: unzip.x86_64 0:6.0-19.el7 Complete! [root@delta ~]#

 

Install MySQL

Download and add the repository, then update.

[root@delta ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm [root@delta ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm [root@delta ~]# yum update [root@delta ~]# yum install mysql-server

 

Init MySQL:

[root@delta ~]# systemctl start mysqld

 

Run the mysql_secure_installation script to address several security concerns in a default MySQL installation.

[root@delta ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist ... Failed! Not critical, keep moving... - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! Cleaning up... [root@delta ~]#

 

Create the BB.DD.:

[root@delta ~]# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 Server version: 5.6.40 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE USER 'userMagento'@'localhost' IDENTIFIED BY 'xxxxxxxxxx'; Query OK, 0 rows affected (0.00 sec) mysql> SELECT User,Host,Password FROM mysql.user; +-------------+-----------+-------------------------------------------+ | User | Host | Password | +-------------+-----------+-------------------------------------------+ | root | localhost | *00A990DF3FB9BC5218E7BF5746087C25B807466E | | root | 127.0.0.1 | *00A990DF3FB9BC5218E7BF5746087C25B807466E | | root | ::1 | *00A990DF3FB9BC5218E7BF5746087C25B807466E | | userMagento | localhost | *068070AF9DA446752D75C3AAA5CA317817AF37A1 | +-------------+-----------+-------------------------------------------+ 4 rows in set (0.00 sec) mysql> CREATE DATABASE `magentoCostaflores` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON magentoCostaflores.* TO "userMagento"@"localhost"; Query OK, 0 rows affected (0.00 sec) mysql> exit; Bye [root@delta ~]#

 

Install PHP 7

[root@delta ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* [root@delta ~]# yum -y install epel-release Add the Remi CentOS repository. [root@delta ~]# rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Install yum-utils as we need the yum-config-manager utility.

[root@delta ~]# yum -y install yum-utils

 

and run yum update

[root@delta ~]# yum update [root@delta ~]# yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm

 

Finalmente ya podemos instalar el PHP 7:

[root@localhost ~]# yum -y install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-mcrypt php70u-gd php70u-devel php70u-mysql php70u-intl php70u-mbstring php70u-bcmath php70u-json php70u-iconv php70u-soap

Restart Apache server:

[root@delta ~]# service httpd restart

Check PHP version

[root@delta ~]# php -v PHP 7.0.30 (cli) (built: Apr 26 2018 13:30:35) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.30, Copyright (c) 1999-2017, by Zend Technologies

The preceding message confirms that the Zend OPcache is installed. We strongly recommend using the OPcache for performance reasons.

Modify PHP options

Edit /etc/php.ini

[root@delta html]# sudo sed -i "s/memory_limit = .*/memory_limit = 2G/" /etc/php.ini [root@delta html]# sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 256M/" /etc/php.ini [root@delta html]# sudo sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php.ini [root@delta html]# sudo sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php.ini [root@delta html]# sudo sed -i "s/;date.timezone.*/date.timezone = UTC/" /etc/php.ini [root@delta html]# sudo sed -i "s/;opcache.save_comments.*/opcache.save_comments = 1/" /etc/php.d/10-opcache.ini error_log = /var/log/php/error.log max_execution_time = 300

Add port 80 and 443 for WEB in firewall

[root@delta ~]# firewall-cmd --permanent --add-port="80"/tcp success [root@delta ~]# firewall-cmd --permanent --add-port="443"/tcp success [root@delta ~]# systemctl restart firewalld [root@delta ~]#

Install Magento 2.2.4

Download zip file from On-premises installation overview | Adobe Commerce  (Full Release with Sample Data (ZIP with sample data)

Add new folder in Apache document root folder: /var/www/html/

[root@delta html]# mkdir magento [root@delta html]# cd magento

 

Copy zip file in new folder and unzip file:

[root@delta magento]# unzip Magento-CE-2.2.4_sample_data-2018-05-01-09-43-25.zip

 

Add permissions:

[root@delta magento]# cd .. [root@delta html]# chown apache:apache /var/www/html/magento/ -R

 

If you choose to enable SELinux, you might have issues running the installer unless you change the security context of some directories as follows:

[root@delta magento]# chcon -R --type httpd_sys_rw_content_t /var/www/html/magento/app/etc [root@delta magento]# chcon -R --type httpd_sys_rw_content_t /var/www/html/magento/var [root@delta magento]# chcon -R --type httpd_sys_rw_content_t /var/www/html/magento/pub/media [root@delta magento]# chcon -R --type httpd_sys_rw_content_t /var/www/html/magento/pub/static [root@delta magento]# chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/ [root@delta magento]# chmod -R a+w /var/www/html/magento/

 

Modify privileges:

[root@delta magento]# cd /var/www/html/magento [root@delta magento]# find /var/www/html/magento/ -type f -print0 | xargs -r0 chmod 640 [root@delta magento]# find /var/www/html/magento/ -type d -print0 | xargs -r0 chmod 750 [root@delta magento]# chmod -R g+w /var/www/html/magento/ {pub,var} [root@delta magento]# chmod -R g+w /var/www/html/magento/ {app/etc,vendor} [root@delta magento]# chmod 750 /var/www/html/magento/bin/magento [root@delta magento]# chmod u+x /var/www/html/magento/bin/magento [root@delta magento]# find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; [root@delta magento]# find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; [root@delta magento]# chmod u+x bin/magento [root@delta magento]# cd /var/www/html/magento && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; && chmod u+x bin/magento

 

Disable SELinux Temporarily

[root@delta magento]# setenforce 0 [root@delta magento]# setenforce Permissive [root@delta magento]# sestatus

 

Installing Magento using a browser, http://newshop.costaflores.com/ and click button "Agree and Setup Magento".

 

Step1. Click button "Start Readiness Check" to start check system:

 

Step 1. If all is ok, click button "Next"

 

Step 2. Set database data and click button "Next"

 

Step 3. Set web configuration and click button "Next"

 

Step 4. Customize your store and click button "Next"

 

Step 5. Create Admin Account and click button "Next"

 

Step 6. Click button "Install Now" to start install

 

And finally it's done!!

 

After installation, reconfigure the permissions:

[root@delta ~]# cd /var/www/html/magento/ [root@delta magento]# find app/etc -type f -exec chmod g-w {} \; [root@delta magento]# find app/etc -type d -exec chmod g-ws {} \;

 

Add to crontab:

[root@delta ~]# crontab -u apache -e */10 * * * * php -c /etc /var/www/html/magento/bin/magento cron:run */10 * * * * php -c /etc /var/www/html/magento/update/cron.php */10 * * * * php -c /etc /var/www/html/magento/bin/magento setup:cron:run

 

Reindex indexes:

[root@delta html]# [root@delta html]# cd /var/www/html/magento/ [root@delta magento]# php bin/magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:00 Customer Grid index has been rebuilt successfully in 00:00:00 Category Products index has been rebuilt successfully in 00:00:00 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:01 Product EAV index has been rebuilt successfully in 00:00:00 Stock index has been rebuilt successfully in 00:00:00 Catalog Search index has been rebuilt successfully in 00:00:01 Catalog Rule Product index has been rebuilt successfully in 00:00:01 Catalog Product Rule index has been rebuilt successfully in 00:00:00 [root@delta magento]#

 

Clean caches:

[root@delta magento]# php bin/magento cache:flush Flushed cache types: config layout block_html collections reflection db_ddl eav customer_notification config_integration config_integration_api full_page translate config_webservice [root@delta magento]#

 

Create backup new install:

Create new folder in your user folder:

[root@delta]# cd /home/<user-folder> [root@delta backup-magento]# mkdir backup-magento [root@delta backup-magento]# cd backup-magento [root@delta backup-magento]# tar cvfz magento-costaflores.tar.gz /var/www/html/magento/ [root@delta backup-magento]# mysqldump -p -u userMagento magentoCostaflores > magentoCostaflores.sql 


Install Composer on CentOS

First you have to go to the /tmp directory

[root@delta ~]# mkdir tmp [root@delta ~]# cd tmp

Download the composer.phar file

[root@localhost tmp]# curl -sS https://getcomposer.org/installer | php All settings correct for using Composer Downloading... Composer (version 1.5.2) successfully installed to: /root/tmp/composer.phar Use it: php composer.phar Move it to /usr/local/bin/ [root@delta tmp]# mv composer.phar /usr/local/bin/composer [root@delta tmp]#

 

Clean directories and set developer mode

[root@delta ~]# cd /var/www/html/magento/ [root@delta magento]# cd pub/static/ [root@delta static]# rm -rf * [root@delta static]# cd ../../var/cache/ [root@delta cache]# rm -rf * [root@delta cache]# cd ../composer_home/ [root@delta composer_home]# rm -rf * [root@delta composer_home]# cd ../page_cache/ [root@delta page_cache]# rm -rf * [root@delta page_cache]# cd ../view_preprocessed/ [root@delta view_preprocessed]# rm -rf * [root@delta view_preprocessed]# cd ../../ [root@delta magento]# php bin/magento deploy:mode:set developer

 

Install new language package (es-es)

Install the Spanish language package from https://github.com/Magento2Translations/language_es_es

[root@delta magento]# composer require magento2translations/language_es_es:dev-master [root@delta magento]# php bin/magento cache:clean

Para editar manualmente un texto en "español" se puede editar el fichero es_ES.csvubicado en <magento-dir>/vendor/magento2translations/language_es_es/es_ES.csv

Una vez modificado el fichero limpiamos la cache con:

[root@delta magento]# php bin/magento cache:clean

Install new language package (pt-pt)

Install the Portuguese language package from https://github.com/Magento2Translations/language_pt_pt

[root@delta magento]# composer require magento2translations/language_pt_pt:dev-master [root@delta magento]# php bin/magento cache:clean

Install SMTP module

Install the SMTP module from https://github.com/mageplaza/magento-2-smtp

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require mageplaza/module-smtp [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Config email account in backend Stores > Configuration > Mageplaza Extensions > SMTP > SMTP Configuration Options

In Magento 2.2.4 and 2.2.5 versión we need install this module for fix Issue #14952 https://github.com/sashas777/bug-from-email

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require sashas/bug-from-email [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Remember, this module works only with Magento 2.2.4/2.2.5 versions and need to be removed after upgrade/downgrade. Assumed that the issue will be fixed in the new release.

Install GDPR module

Install the GPDR module from GitHub - mageplaza/magento-2-gdpr: Magento 2 GDPR extension helps online stores which are directly affected by GDPR, Mageplaza is about to release an extension called Mageplaza GDPR for Magento 2. This module is to supports online stores to comply those data privacy regulations.

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require mageplaza/module-gdpr [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Config GDPR module in backend Stores > Configuration > Mageplaza Extensions > GDPR > General Configuration

  • Enable: Yes

  • Allow Delete Customer Account:

  • Delete message:

  • Allow Delete Default Address:

Install COOKIE module

Install the "EU Cookie" module from https://marketplace.magento.com/hellobrave-cookiecompliance.html

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require hellobrave/cookiecompliance [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Config cookie module in backend Stores > Configuration > Hellobrave > Cookie Compliance > General

  • Enable Module: Yes

  • Banner Message: Esta tienda utiliza cookies y otras tecnologías para que podamos mejorar su experiencia en nuestros sitios.

  • More Information Link Text : Más Información

  • More Information Link URL : /politica-de-cookies

  • Hide Message Link Text : Cerrar Mensaje

Install AGE VERIFICATION module

Install the "Age Verification" module from https://marketplace.magento.com/vsourz-age-verification.html

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require vsourz/age-verification [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Config "Age Verification" module in backend Stores > Configuration > VSOURZ > Ageverification Pup-up > General Settings

  • Enable Extension: Yes

  • Pages: Use system value

  • Pop-Up Blocks: Use system value (by default is Content > Blocks > Verificación Edad)

    Disagree Block : Use system value (by default is Content > Blocks > Age Gate Disagree)

  • Cookie interval : Use system value

  • Pop-Up Width: Use system value (auto)

  • Pop-Up Height: Use system value (auto)

  • Agree button text: Si, tengo la edad legal

  • Disagree button text: No

Install MERCADO PAGO payment module

Install the "Mercado Pago" payment module from Home

[root@delta magento]# php bin/magento deploy:mode:set developer [root@delta magento]# composer require mercadopago/magento2-plugin [root@delta magento]# php bin/magento setup:upgrade [root@delta magento]# php bin/magento deploy:mode:set production

Config "Mercado Pago" payment module in backend Stores > Configuration > SALES > Payment Methots > Mercado Pago - Classic Checkout

Add custom CSS styles

In backend panel, go to Content > Design > Configuration > select "Default Store View" Edit

HTML Head > Scripts and Style Sheets add follow lines:

<link rel="stylesheet" type="text/css" media="all" href="{{MEDIA_URL}}styles.css" /> <link rel="stylesheet" type="text/css" media="all" href="{{MEDIA_URL}}costaflores.css" />

Create and edit /var/www/html/magento/pub/media/costaflores.css to add new styles.

Crete new Category

In backend panel, go to Catalog > Categories , select Default Category and press "Add Subcategory" button.

Create new Products (Simple Product)

In backend panel, go to Catalog > Products, select "Add Product" button.

Create new Products (Virtual Product)

In backend panel, go to Catalog > Products, select "Add Product > Virtual Product" button.

In "Advanced Inventory" select "Minimum Qty Allowed in Shopping Cart = 6

In "Customizable Options" create new option, "Add option"

  • Option Title: Wallet compatible ERC20 (Metamask, Trust, etc) necesario para poder ingresar los tokens comprados *

  • Option type: Field

  • Required: Yes

  • Price: (none)

  • Price Type: Fixed

  • SKU: (none)

  • Max. Characters: 0

Enable "Term And Conditions" in Checkout

Firstly, you need to set the text box of Terms and Conditions in the store backend. Before reaching to the configuration, you will have to log in your admin account then follow this path Store > Terms and Conditions

To create new Term and Conditions for your store, click on "Add New Condition" button. Then enter your intent in the following fields: the Condition Name, Checkbox Text, Content, and Content Height (CSS).

In the Status field, choose Enable to activate the Terms and Conditions feature.

Go to Store > Configuration > Sales > Checkout > Checkout Options, set the "Enable Terms and Conditions" field to Yes and click on "Save Config" button.

Enable "Requiere Email Confirmation" to create a new customer account

Go to Store > Configuration > Customers > Customer Configuration > Create New Account Options > Requiere Emails Confirmation set to "Yes"

 

Translate Home page to English an Portuguese

Create a new block

Enter in the Magento Dashboard and go to Content > Blocks and click "Add New Block" button

And click "Save Block" button.

Create a new Widtget

Enter in the Magento Dashboard and go to Content > Widgets and click "Add Widget" button.

In the first tab "Storefront Properties":

 

In the next tab "Widget Options":

And click "Save Widget" button.

Do the same for the language in Portuguese, create a new block and a new widget by assigning its corresponding language block.

Finally, edit the original widget by default, to modify it will only be shown in the default Spanish language, so the two new widgets that are assigned to the English and Portuguese blocks will have effect.

 

In the first tab "Storefront Properties", assign to store views select Spanish:

 

And in the next tab "Widget Options" select the "Home Page Block" default in spanish:

 

And click "Save" button.

So that the changes take effect and can be seen in the frontend, we clean the caches from the system console:

[root@delta magento]# php bin/magento cache:clean

Change URL

In backend Stores > Configuration > General > Web > Base URLs and modify

 

Configure two base currency in Magento

We want to work in the store with three currencies (AR$ / US$ / EUR). 

We have 2 forms of payment that only work with one currency, "Mercado Pago" only works with AR$, and "Pay Pay" only works with USD and EUR.

We need create:

  • one store for Argentina users, one store view in spanish, with AR$ currency and "Mercado Pago" payment method.

  • another store for EU users, several store views (spanish, english, portuguese, etc), with EUR currency, "Pay Pal" payment method.

 

First separate product prices for websites with the "Catalog Price Scope" option:

Go to the backend "Stores → Configuration → Catalog → Catalog → Price" configuration section.
Find the "Catalog Price Scope" dropdown, uncheck the checkbox at the right, and choose the "Website" value from the dropdown instead of the default "Global" value:

 

Finally, define "Base Currency" for every website scope. 

Go to the backend "Stores → Configuration" and change the settings scope to a particular website, for example "Website EU"

 

Go to the "General → Currency Setup → Currency Options" configuration section.
Find the "Base Currency" option, uncheck the checkbox at the right (Use Default), and choose a currency.

Repeat this with every website scope.

 

Sample checkout in EU store with EUR currency:

 

Sample checkout in default store (Argentina) with AR$ currency:

Related content