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:

 

Configure new virtualhost:

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

 

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

 

Firewall Add ports:

 

Reload firewall rules:

 

List rules:

 

Install Wget:

 

Install unzip:

 

Install MySQL

Download and add the repository, then update.

 

Init MySQL:

 

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

 

Create the BB.DD.:

 

Install PHP 7

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

 

and run yum update

 

Finalmente ya podemos instalar el PHP 7:

Restart Apache server:

Check PHP version

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

Add port 80 and 443 for WEB in firewall

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/

 

Copy zip file in new folder and unzip file:

 

Add permissions:

 

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

 

Modify privileges:

 

Disable SELinux Temporarily

 

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:

 

Add to crontab:

 

Reindex indexes:

 

Clean caches:

 

Create backup new install:

Create new folder in your user folder:


Install Composer on CentOS

First you have to go to the /tmp directory

Download the composer.phar file

 

Clean directories and set developer mode

 

Install new language package (es-es)

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

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:

Install new language package (pt-pt)

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

Install SMTP module

Install the SMTP module from GitHub - mageplaza/magento-2-smtp: Magento 2 SMTP Extension helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers.

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 GitHub - sashas777/bug-from-email: Fix for Magento 2.2.4 GitHub Issue #14952 (https://github.com/magento/magento2/issues/14952)

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 https://github.com/mageplaza/magento-2-gdpr

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

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

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 https://github.com/mercadopago/cart-magento2/wiki/Instalaci%C3%B3n

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:

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:

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: