Ecommerce Solution

Ecommerce Solution

This section describes the, now defunct, e-commerce solution for which much time and money was wasted.

Requirements

Functional requirements for the shopping cart (view en wiki page Requirements definitions)

Design

Design of the home page and product detail for Magento e-commerce.

Home

 

Product detail

 

Software

The software chosen for the store of Costaflores is the Magento Community Edition 2.x, for its integration with the ERP Openbravo

On-premises installation overview | Adobe Commerce

Magento 2.1.x technology stack requirements

  • Operating systems (Linux x86-64): CentOS 7

  • CPU: 4 cores x 2 GHz

  • Memory requirement: up to 4GB of RAM

  • Hard Disk: 30 GB

  • Web servers: Apache 2.4 In addition, the apache mod_rewrite module must be enabled. mod_rewrite enables the server to perform URL rewriting

  • Database: MySQL 5.6

  • PHP: 7.0.24

  • Required PHP extensions:

  • bc-math (Magento Commerce only)

    • curl

    • gd, ImageMagick 6.3.7 (or later) or both

    • intl

    • mbstring

    • mcrypt

    • mhash

    • openssl

    • PDO/MySQL

    • SimpleXML

    • soap

    • xml

    • xsl

    • zip

    • PHP 7 only: json / iconv

 

Installation flow diagram

The following diagram provides a high-level overview of installing the Magento software:

The diagram shows the following:

  1. Set up your server environment. 

  2. Get the Magento software.

    Install the Magento software using either the Web Setup Wizard or command line.

    Verify the installation by viewing your storefront and the Magento Admin.

 

Install Magento 2.1.9 in server test CentOS 7

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@localhost html]# mkdir magento-costaflores [root@localhost html]# cd magento-costaflores

Copy zip file in new folder and unzip file:

[root@localhost magento-costaflores]# unzip Magento-CE-2.1.10_sample_data-2017-11-04-01-01-15.zip

Add permissions:

[root@localhost magento-costaflores]# cd ..

[root@localhost html]# chown apache:apache magento-costaflores/ -R

 

Create new BB.DD. for Magento:

[root@localhost html]# mysql -p (insert root password) Create new user: mysql> CREATE USER 'usermagento'@'localhost' IDENTIFIED BY 'c0$t4fl0r3$'; Show users: mysql> SELECT User,Host,Password FROM mysql.user; Create new data base: mysql> CREATE DATABASE `magento21costaflores` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; Assign grant permissions: mysql> GRANT ALL PRIVILEGES ON magento21costaflores.* TO "usermagento"@"localhost"; mysql> exit Bye [root@localhost html]#

 

Install PHP

[root@localhost ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* [root@localhost ~]# yum -y install epel-release Complementos cargados:fastestmirror Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 mysql-connectors-community | 2.5 kB 00:00:00 mysql-tools-community | 2.5 kB 00:00:00 mysql56-community | 2.5 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/7): base/7/x86_64/group_gz | 156 kB 00:00:00 (2/7): base/7/x86_64/primary_db | 5.7 MB 00:00:01 (3/7): extras/7/x86_64/primary_db | 129 kB 00:00:00 (4/7): mysql-connectors-community/x86_64/primary_db | 16 kB 00:00:01 (5/7): mysql-tools-community/x86_64/primary_db | 35 kB 00:00:01 (6/7): updates/7/x86_64/primary_db | 3.6 MB 00:00:00 (7/7): mysql56-community/x86_64/primary_db | 179 kB 00:00:06 Determining fastest mirrors * base: ftp.cixug.es * extras: ftp.cixug.es * updates: ftp.cixug.es Resolviendo dependencias --> Ejecutando prueba de transacción ---> Paquete epel-release.noarch 0:7-9 debe ser instalado --> Resolución de dependencias finalizada Dependencias resueltas ==================================================================================================================================================================================== Package Arquitectura Versión Repositorio Tamaño ==================================================================================================================================================================================== Instalando: epel-release noarch 7-9 extras 14 k Resumen de la transacción ==================================================================================================================================================================================== Instalar 1 Paquete Tamaño total de la descarga: 14 k Tamaño instalado: 24 k Downloading packages: epel-release-7-9.noarch.rpm | 14 kB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Instalando : epel-release-7-9.noarch 1/1 Comprobando : epel-release-7-9.noarch 1/1 Instalado: epel-release.noarch 0:7-9 ¡Listo! [root@localhost ~]# Add the Remi CentOS repository. [root@localhost ~]# rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm Recuperando http://rpms.remirepo.net/enterprise/remi-release-7.rpm advertencia:/var/tmp/rpm-tmp.2IpbXn: EncabezadoV4 DSA/SHA1 Signature, ID de clave 00f97f56: NOKEY Preparando... ################################# [100%] Actualizando / instalando... 1:remi-release-7.3-2.el7.remi ################################# [100%] [root@localhost ~]# Install yum-utils as we need the yum-config-manager utility. [root@localhost ~]# yum -y install yum-utils Complementos cargados:fastestmirror epel/x86_64/metalink | 23 kB 00:00:00 epel | 4.3 kB 00:00:00 remi-safe | 2.9 kB 00:00:00 (1/4): epel/x86_64/group_gz | 261 kB 00:00:00 epel/x86_64/primary_db FAILED http://mirror.23media.de/epel/7/x86_64/repodata/b0aeec632d138e9d2d3d715f990345308baf8f1feb9315a5ff4765db683bc658-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found--:-- ETA Intentando con otro espejo. To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623 If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/ (2/4): epel/x86_64/updateinfo | 842 kB 00:00:00 (3/4): epel/x86_64/primary_db | 6.1 MB 00:00:00 (4/4): remi-safe/primary_db | 1.1 MB 00:00:01 Loading mirror speeds from cached hostfile * base: ftp.cixug.es * epel: fr.mirror.babylon.network * extras: ftp.cixug.es * remi-safe: fr.mirror.babylon.network * updates: ftp.cixug.es Resolviendo dependencias --> Ejecutando prueba de transacción ---> Paquete yum-utils.noarch 0:1.1.31-42.el7 debe ser instalado --> Procesando dependencias: yum >= 3.4.3-143 para el paquete: yum-utils-1.1.31-42.el7.noarch --> Procesando dependencias: python-kitchen para el paquete: yum-utils-1.1.31-42.el7.noarch --> Procesando dependencias: libxml2-python para el paquete: yum-utils-1.1.31-42.el7.noarch --> Ejecutando prueba de transacción ---> Paquete libxml2-python.x86_64 0:2.9.1-6.el7_2.3 debe ser instalado --> Procesando dependencias: libxml2 = 2.9.1-6.el7_2.3 para el paquete: libxml2-python-2.9.1-6.el7_2.3.x86_64 ---> Paquete python-kitchen.noarch 0:1.1.1-5.el7 debe ser instalado --> Procesando dependencias: python-chardet para el paquete: python-kitchen-1.1.1-5.el7.noarch ---> Paquete yum.noarch 0:3.4.3-132.el7.centos.0.1 debe ser actualizado ---> Paquete yum.noarch 0:3.4.3-154.el7.centos debe ser una actualización --> Procesando dependencias: rpm >= 4.11.3-22 para el paquete: yum-3.4.3-154.el7.centos.noarch --> Procesando dependencias: python-urlgrabber >= 3.10-8 para el paquete: yum-3.4.3-154.el7.centos.noarch --> Ejecutando prueba de transacción ---> Paquete libxml2.x86_64 0:2.9.1-6.el7_2.2 debe ser actualizado ---> Paquete libxml2.x86_64 0:2.9.1-6.el7_2.3 debe ser una actualización ---> Paquete python-chardet.noarch 0:2.2.1-1.el7_1 debe ser instalado ---> Paquete python-urlgrabber.noarch 0:3.10-7.el7 debe ser actualizado ---> Paquete python-urlgrabber.noarch 0:3.10-8.el7 debe ser una actualización ---> Paquete rpm.x86_64 0:4.11.3-17.el7 debe ser actualizado --> Procesando dependencias: rpm = 4.11.3-17.el7 para el paquete: rpm-libs-4.11.3-17.el7.x86_64 --> Procesando dependencias: rpm = 4.11.3-17.el7 para el paquete: rpm-python-4.11.3-17.el7.x86_64 ---> Paquete rpm.x86_64 0:4.11.3-25.el7 debe ser una actualización --> Ejecutando prueba de transacción ---> Paquete rpm-libs.x86_64 0:4.11.3-17.el7 debe ser actualizado --> Procesando dependencias: rpm-libs(x86-64) = 4.11.3-17.el7 para el paquete: rpm-build-libs-4.11.3-17.el7.x86_64 ---> Paquete rpm-libs.x86_64 0:4.11.3-25.el7 debe ser una actualización ---> Paquete rpm-python.x86_64 0:4.11.3-17.el7 debe ser actualizado ---> Paquete rpm-python.x86_64 0:4.11.3-25.el7 debe ser una actualización --> Ejecutando prueba de transacción ---> Paquete rpm-build-libs.x86_64 0:4.11.3-17.el7 debe ser actualizado ---> Paquete rpm-build-libs.x86_64 0:4.11.3-25.el7 debe ser una actualización --> Resolución de dependencias finalizada Dependencias resueltas ==================================================================================================================================================================================== Package Arquitectura Versión Repositorio Tamaño ==================================================================================================================================================================================== Instalando: yum-utils noarch 1.1.31-42.el7 base 117 k Instalando para las dependencias: libxml2-python x86_64 2.9.1-6.el7_2.3 base 247 k python-chardet noarch 2.2.1-1.el7_1 base 227 k python-kitchen noarch 1.1.1-5.el7 base 267 k Actualizando para las dependencias: libxml2 x86_64 2.9.1-6.el7_2.3 base 668 k python-urlgrabber noarch 3.10-8.el7 base 108 k rpm x86_64 4.11.3-25.el7 base 1.2 M rpm-build-libs x86_64 4.11.3-25.el7 base 104 k rpm-libs x86_64 4.11.3-25.el7 base 275 k rpm-python x86_64 4.11.3-25.el7 base 81 k yum noarch 3.4.3-154.el7.centos base 1.2 M Resumen de la transacción ==================================================================================================================================================================================== Instalar 1 Paquete (+3 Paquetes dependientes) Actualizar ( 7 Paquetes dependientes) Tamaño total de la descarga: 4.4 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/11): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm | 247 kB 00:00:02 (2/11): libxml2-2.9.1-6.el7_2.3.x86_64.rpm | 668 kB 00:00:02 (3/11): python-chardet-2.2.1-1.el7_1.noarch.rpm | 227 kB 00:00:02 (4/11): python-urlgrabber-3.10-8.el7.noarch.rpm | 108 kB 00:00:00 (5/11): python-kitchen-1.1.1-5.el7.noarch.rpm | 267 kB 00:00:00 (6/11): rpm-build-libs-4.11.3-25.el7.x86_64.rpm | 104 kB 00:00:00 (7/11): rpm-python-4.11.3-25.el7.x86_64.rpm | 81 kB 00:00:00 (8/11): rpm-libs-4.11.3-25.el7.x86_64.rpm | 275 kB 00:00:00 (9/11): yum-utils-1.1.31-42.el7.noarch.rpm | 117 kB 00:00:00 (10/11): yum-3.4.3-154.el7.centos.noarch.rpm | 1.2 MB 00:00:00 (11/11): rpm-4.11.3-25.el7.x86_64.rpm | 1.2 MB 00:00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 921 kB/s | 4.4 MB 00:00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction Advertencia: Las bases de datos (RPMDB) han sido modificadas por un elemento ajeno a yum. Actualizando : rpm-libs-4.11.3-25.el7.x86_64 1/18 Actualizando : rpm-4.11.3-25.el7.x86_64 2/18 Actualizando : rpm-build-libs-4.11.3-25.el7.x86_64 3/18 Actualizando : rpm-python-4.11.3-25.el7.x86_64 4/18 Actualizando : python-urlgrabber-3.10-8.el7.noarch 5/18 Actualizando : yum-3.4.3-154.el7.centos.noarch 6/18 Instalando : python-chardet-2.2.1-1.el7_1.noarch 7/18 Instalando : python-kitchen-1.1.1-5.el7.noarch 8/18 Actualizando : libxml2-2.9.1-6.el7_2.3.x86_64 9/18 Instalando : libxml2-python-2.9.1-6.el7_2.3.x86_64 10/18 Instalando : yum-utils-1.1.31-42.el7.noarch 11/18 Limpieza : yum-3.4.3-132.el7.centos.0.1.noarch 12/18 Limpieza : rpm-python-4.11.3-17.el7.x86_64 13/18 Limpieza : python-urlgrabber-3.10-7.el7.noarch 14/18 Limpieza : rpm-build-libs-4.11.3-17.el7.x86_64 15/18 Limpieza : rpm-4.11.3-17.el7.x86_64 16/18 Limpieza : rpm-libs-4.11.3-17.el7.x86_64 17/18 Limpieza : libxml2-2.9.1-6.el7_2.2.x86_64 18/18 Comprobando : rpm-build-libs-4.11.3-25.el7.x86_64 1/18 Comprobando : rpm-4.11.3-25.el7.x86_64 2/18 Comprobando : libxml2-2.9.1-6.el7_2.3.x86_64 3/18 Comprobando : yum-utils-1.1.31-42.el7.noarch 4/18 Comprobando : libxml2-python-2.9.1-6.el7_2.3.x86_64 5/18 Comprobando : rpm-libs-4.11.3-25.el7.x86_64 6/18 Comprobando : yum-3.4.3-154.el7.centos.noarch 7/18 Comprobando : python-chardet-2.2.1-1.el7_1.noarch 8/18 Comprobando : python-kitchen-1.1.1-5.el7.noarch 9/18 Comprobando : rpm-python-4.11.3-25.el7.x86_64 10/18 Comprobando : python-urlgrabber-3.10-8.el7.noarch 11/18 Comprobando : rpm-libs-4.11.3-17.el7.x86_64 12/18 Comprobando : libxml2-2.9.1-6.el7_2.2.x86_64 13/18 Comprobando : rpm-python-4.11.3-17.el7.x86_64 14/18 Comprobando : rpm-build-libs-4.11.3-17.el7.x86_64 15/18 Comprobando : rpm-4.11.3-17.el7.x86_64 16/18 Comprobando : yum-3.4.3-132.el7.centos.0.1.noarch 17/18 Comprobando : python-urlgrabber-3.10-7.el7.noarch 18/18 Instalado: yum-utils.noarch 0:1.1.31-42.el7 Dependencia(s) instalada(s): libxml2-python.x86_64 0:2.9.1-6.el7_2.3 python-chardet.noarch 0:2.2.1-1.el7_1 python-kitchen.noarch 0:1.1.1-5.el7 Dependencia(s) actualizada(s): libxml2.x86_64 0:2.9.1-6.el7_2.3 python-urlgrabber.noarch 0:3.10-8.el7 rpm.x86_64 0:4.11.3-25.el7 rpm-build-libs.x86_64 0:4.11.3-25.el7 rpm-libs.x86_64 0:4.11.3-25.el7 rpm-python.x86_64 0:4.11.3-25.el7 yum.noarch 0:3.4.3-154.el7.centos ¡Listo! [root@localhost ~]# and run yum update [root@localhost ~]# yum update [root@localhost ~]# yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm Complementos cargados:fastestmirror ius-release-1.0-14.ius.centos7.noarch.rpm | 8.1 kB 00:00:00 Examinando /var/tmp/yum-root-OdkP2w/ius-release-1.0-14.ius.centos7.noarch.rpm: ius-release-1.0-15.ius.centos7.noarch Marcando /var/tmp/yum-root-OdkP2w/ius-release-1.0-14.ius.centos7.noarch.rpm para ser instalado Resolviendo dependencias --> Ejecutando prueba de transacción ---> Paquete ius-release.noarch 0:1.0-15.ius.centos7 debe ser instalado --> Resolución de dependencias finalizada Dependencias resueltas ==================================================================================================================================================================================== Package Arquitectura Versión Repositorio Tamaño ==================================================================================================================================================================================== Instalando: ius-release noarch 1.0-15.ius.centos7 /ius-release-1.0-14.ius.centos7.noarch 8.5 k Resumen de la transacción ==================================================================================================================================================================================== Instalar 1 Paquete Tamaño total: 8.5 k Tamaño instalado: 8.5 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Instalando : ius-release-1.0-15.ius.centos7.noarch 1/1 Comprobando : ius-release-1.0-15.ius.centos7.noarch 1/1 Instalado: ius-release.noarch 0:1.0-15.ius.centos7 ¡Listo! [root@localhost ~]#

 

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 Instalado: mod_php70u.x86_64 0:7.0.24-1.ius.centos7 php70u-bcmath.x86_64 0:7.0.24-1.ius.centos7 php70u-common.x86_64 0:7.0.24-1.ius.centos7 php70u-devel.x86_64 0:7.0.24-1.ius.centos7 php70u-gd.x86_64 0:7.0.24-1.ius.centos7 php70u-intl.x86_64 0:7.0.24-1.ius.centos7 php70u-json.x86_64 0:7.0.24-1.ius.centos7 php70u-mbstring.x86_64 0:7.0.24-1.ius.centos7 php70u-mcrypt.x86_64 0:7.0.24-1.ius.centos7 php70u-mysqlnd.x86_64 0:7.0.24-1.ius.centos7 php70u-opcache.x86_64 0:7.0.24-1.ius.centos7 php70u-pdo.x86_64 0:7.0.24-1.ius.centos7 php70u-soap.x86_64 0:7.0.24-1.ius.centos7 php70u-xml.x86_64 0:7.0.24-1.ius.centos7 Dependencia(s) instalada(s): autoconf.noarch 0:2.69-11.el7 automake.noarch 0:1.13.4-3.el7 libX11.x86_64 0:1.6.5-1.el7 libX11-common.noarch 0:1.6.5-1.el7 libXau.x86_64 0:1.0.8-2.1.el7 libXpm.x86_64 0:3.5.12-1.el7 libicu.x86_64 0:50.1.2-15.el7 libjpeg-turbo.x86_64 0:1.2.90-5.el7 libmcrypt.x86_64 0:2.5.8-13.el7 libpng.x86_64 2:1.5.13-7.el7_2 libtool-ltdl.x86_64 0:2.4.2-22.el7_3 libwebp.x86_64 0:0.3.0-7.el7 libxcb.x86_64 0:1.12-1.el7 libxslt.x86_64 0:1.1.28-5.el7 m4.x86_64 0:1.4.16-10.el7 perl-Test-Harness.noarch 0:3.28-3.el7 perl-Thread-Queue.noarch 0:3.02-2.el7 php70u-cli.x86_64 0:7.0.24-1.ius.centos7 ¡Listo! [root@localhost ~]#

 

Restart Apache server: [root@localhost ~]# service httpd restart Check PHP version: [root@localhost ~]# php -v PHP 7.0.24 (cli) (built: Sep 28 2017 09:51:07) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.24, Copyright (c) 1999-2017, by Zend Technologies [root@localhost ~]# Add port 80 for WEB in firewall: [root@localhost ~]# firewall-cmd --permanent --add-port="80"/tcp Restart firewall: [root@localhost ~]# systemctl restart firewalld

Modify privileges:

[root@localhost ~]# chown -R :apache /var/www/html/magento-costaflores/ [root@localhost ~]# cd /var/www/html/magento-costaflores/

[root@localhost magento-costaflores]# find /var/www/html/magento-costaflores/ -type f -print0 | xargs -r0 chmod 640
[root@localhost magento-costaflores]# find /var/www/html/magento-costaflores/ -type d -print0 | xargs -r0 chmod 750
[root@localhost magento-costaflores]# chmod -R g+w /var/www/html/magento-costaflores/ {pub,var}
[root@localhost magento-costaflores]# chmod -R g+w /var/www/html/magento-costaflores/ {app/etc,vendor}
[root@localhost magento-costaflores]# chmod 750 /var/www/html/magento-costaflores/bin/magento
[root@localhost magento-costaflores]# chmod u+x /var/www/html/magento-costaflores/bin/magento

 

Para evitar errores en la instalación con el SElinux: [root@localhost magento-costaflores]# chcon -R -t httpd_sys_rw_content_t /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# chmod -R a+w /var/www/html/magento-costaflores/

Restart Apache server:

[root@localhost magento-costaflores]# service httpd restart

 

Install Magento:

In a web browser, type url http://192.168.1.167/magento-costaflores/setup/

Step 1: Readiness Check

 

Click button "Start Readiness Check"

 

Step 2: Add a Database

Database Server Host: localhost
Database Server Username: usermagento
Database Server Password: c0$t4fl0r3$
Database Name: magento21costaflores
Table prefix: (optional)

 

Step 3: Web Configuration

Your Store Address: http://192.168.1.167/magento-costaflores/
Magento Admin Address: http://192.168.1.167/magento-costaflores/admin_1hzodk

 

Step 4: Customize Your Store

Store Default Time Zone: Western European Standard Time (Europe/Lisbon)
Store Default Currency: Euro (EUR)
Store Default Language: Spanish (Spain)

 

Step 5: Create Admin Account

Create a new Admin account to manage your store.
New Username: adminCosta
New Email: anto@bylapera.com
New Password: shop5$Costa$
Confirm Password: shop5$Costa$

 

Step 6: Install

You're ready!
Install Now

Success
Please keep this information for your records:

 

After install Magento:

Assign new permission:

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

Add new crontab:

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

Reindex

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# 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:01 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:03 Product EAV index has been rebuilt successfully in 00:00:01 Catalog Search index has been rebuilt successfully in 00:00:03 Stock index has been rebuilt successfully in 00:00:00 Catalog Rule Product index has been rebuilt successfully in 00:00:03 Catalog Product Rule index has been rebuilt successfully in 00:00:00 [root@localhost magento-costaflores]#

Access Admin backend:

Go to Magento Admin Address: http://192.168.1.167/magento-costaflores/admin_1hzodk/

Install new language package (spanish)

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# wget https://github.com/Magento2Translations/language_es_es/blob/master/es_ES.csv

Download language package https://github.com/Magento2Translations/language_es_es/archive/master.zip

Create new directories:

[root@localhost magento-costaflores]# cd app/ [root@localhost app]# mkdir i18n [root@localhost app]# mkdir i18n/magento2translations [root@localhost app]# mkdir i18n/magento2translations/es_es [root@localhost app]#

Unzip in the new folder /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/

[root@localhost language_es_es-master]# cp * /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ [root@localhost language_es_es-master]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# find /var/www/html/magento-costaflores/ -type f -print0 | xargs -r0 chmod 640 [root@localhost magento-costaflores]# find /var/www/html/magento-costaflores/ -type d -print0 | xargs -r0 chmod 750 [root@localhost magento-costaflores]# chmod -R g+w /var/www/html/magento-costaflores/ {app/etc,vendor} [root@localhost magento-costaflores]#
  • Edit the registration.php file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.

<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::LANGUAGE, 'magento2translations_es_es', __DIR__ );
  • Edit the language.xml file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.

<?xml version="1.0"?> <language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd"> <code>es_ES</code> <vendor>magento2translations</vendor> <package>es_es</package> </language>


Edit the composer.json file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.

{ "name": "magento2translations/es_es", "description": "European Spanish (español de España) Magento2 Language Pack (es_ES) - From Magento2Translations", "version": "0.0.3", "homepage": "http://magento2translations.github.io/", "license": [ "MIT" ], "authors": [ { "name": "Justin van Elst", "homepage": "https://github.com/MrGekko" }, { "name": "Magento official translations project for Magento 2", "homepage": "https://crowdin.com/project/magento-2" } ], "require": { "magento/framework": "*" }, "type": "magento2-language", "autoload": { "files": [ "registration.php" ] } }

 

Run the following command lines:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento setup:upgrade [root@localhost magento-costaflores]# php bin/magento setup:static-content:deploy en_US [root@localhost magento-costaflores]# php bin/magento setup:static-content:deploy es_ES [root@localhost magento-costaflores]# php bin/magento cache:flush


Update cache:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento cache:flush Flushed cache types: config layout block_html collections reflection db_ddl eav customer_notification full_page config_integration config_integration_api translate config_webservice [root@localhost magento-costaflores]#

 

Change language in backend:

Go to the Magento Admin, user account > Account Setting and set the "Interface Locale" to "Español (España) / español (España)

Update cache in command shell:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento cache:flush

Change language in frontend:

Go to the Magento Admin, Stores > Configuration > General > General > Locale Options. Set the Locale to "español (España)"

  • Set Locale to "español (España)"

  • Set Weight Unit to "kgs"

  • Set First Day of Week to "Monday"

Go to the Magento Admin, Stores > Configuration > General > General > Country Options.

  • Set Default Country to "Argentina"

Go to the Magento Admin, Stores > Configuration > General > General > Store Information.

  • Set Store Name to "Costaflores"

  • Set Store Phone Number to "+54 92616579272"

  • Set Country to "Argentina"

  • Set Region/State to "Mendoza"

  • Set City to "Mendoza"

Update cache in command shell:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento cache:flush

Modify Shop config

Admin > Stores > Configuration > General > Store Email Addresses > General Contact.

Admin > Stores > Configuration > General > Store Email Addresses > Sales Representative.

Admin > Stores > Configuration > General > Store Email Addresses > Customer Support.

Select currency

Stores > Config > General > Config currency > Currency Options

  • Set Base Currency to "Argentine Peso"

  • Set Default Display Currency to "Argentine Peso"

  • Set Allowed Currencies to "Argentine Peso, Euro"

Change symbol:
Stores > Currency Symbols. Uncheck "use Standard" and modify "AR $"

Add new Product Attributes & Product Attribute Templates

Stores > Attributes > Product - Add New Attribute

 

Create four new attributes:

  • Varietal (Malbec 55%, Petit Verdot 30%, Cabernet Sauvignon 15% / Torrontes 100%)

  • Origen (Costaflores Perdriel, Mendoza)

  • Categoría (Tinto / Blanco)

  • Packagin (Caja de 6 botellas x (750 cc) )

 

 

Add new attributes to default group

Stores > Attributes > Product Template - Select Default

 

 

Add new group (name = Wine Attributes)
Add in "Wine Attributes" new group the new "Unassigned Attributes" (varietal / origen / categoria / packagin)

 

 

Add custom CSS styles

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-costaflores/pub/media/costaflores.css to add new styles.

Customize Store:

Content > Design > Configuration > select "Default Store View" Edit

add logo, favicon, meta, welcome message, footer copyright, etc.

Remove search box in header

Stores > Config > Advanced options > advanced options > Magento_Search = disabled

Remove newsletter form submit in footer (version 2.1.x)

Stores > Config > Advanced options > advanced options > Magento_Newsletter = disbled

Remove second column footer links and newsletter form submit in footer (version 2.2.4)

Edit /var/www/html/magento-costaflores/vendor/magento/theme-frontend-luma/Magento_Theme/layout/default.xml and

Add following line to that file after <body> tag

<referenceBlock name="footer_links" remove="true" /> <referenceBlock name="form.subscribe" remove="true" />

Add new footer block (right content)

Content > Block > Add New Block

  • Block title = Footer Links Block Right

  • Identifier = footer_links_block_right

  • Store View = All Store Views

  • Status = enabled

  • Content =

<div class="footer-right-column"> <ul class="footer links"> <li class="nav item"><a href="store url="about-us"">About us</a></li> <li class="nav item"><a href="store url="customer-service"">Customer Service</a></li> </ul> </div>

Add the new block "Footer Links Block Right" in a new Widget

Content > Widgets > Add new Widget

  • Type = CMS Static Block

  • Design Theme = Magento Luma

Click "Continue" and configure Storefront Properties:

  • Widget Title = Footer Links Right

  • Assign to Store Views = All Store Views

  • Order = 1

Click Add Layout Update

  • Display on: All Pages

  • Container: Page Footer

Click on the Widget Options tab
Click on the button Select Block

  • Select your block: Footer Links Block Right

Click on Save (top right orange button)

Update cache:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento cache:flush

 

Modify left footer block:

Content > Blocks Select Edit "Footer Links Block"

<div class="footer-left-column"> <h4>Costaflores</h4> <p>Distrito Perdriel, Departamento Luján de Cuyo</p> <p>Mendoza, Argentina</p> <ul class="social-media-links"> <li><a class="black-twitter-24x24" target="_blank" href="http://twitter.com/theluckhunters"><span>Twitter</span></a></li> <li><a class="black-youtube-24x24" target="_blank" href="http://twitter.com/theluckhunters"><span>Youtube</span></a></li> <li><a class="black-facebook-24x24" target="_blank" href="http://twitter.com/theluckhunters"><span>Facebook</span></a></li> </ul> </div>

Add new "Menu navigation header bar" block

Content > Block > Add New Block

  • Block title = Menu navigation header bar

  • Identifier = menu-navigation-header-bar

  • Status = enabled

  • Content =

<nav class="navigation navigation-widget" data-action="navigation"> <ul id="ui-id-2" class="ui-menu ui-widget ui-widget-content ui-corner-all" role="menu" tabindex="0" aria-activedescendant="ui-id-3"> <li class="level0 nav-1 first level-top ui-menu-item" role="presentation"> <a href="{{store url=""}}what-is-new.html" class="level-top ui-corner-all" id="ui-id-3" tabindex="-1" role="menuitem"><span>Novedades</span></a> </li> <li class="level0 nav-2 last level-top ui-menu-item" role="presentation"> <a href="{{store url=""}}vinos.html" class="level-top ui-corner-all" id="ui-id-4" tabindex="-1" role="menuitem"><span>Vinos</span></a> </li> <li class="level0 nav-3 last level-top ui-menu-item" role="presentation"> <a target="_blank" href="http://costaflores.com" class="level-top ui-corner-all" id="ui-id-5" tabindex="-1" role="menuitem"><span>Costaflores website</span></a> </li> <li class="level0 nav-4 last level-top ui-menu-item" role="presentation"> <a target="_blank" href="http://openvino.org" class="level-top ui-corner-all" id="ui-id-5" tabindex="-1" role="menuitem"><span>Openvino website</span></a> </li> </ul> </nav>

Add the new block "Menu navigation header bar" in a new Widget

Content > Widgets > Add new Widget

  • Type = CMS Static Block

  • Design Theme = Magento Luma

Click "Continue" and configure Storefront Properties:

  • Widget Title = Menu Navigation Header bar

  • Assign to Store Views = All Store Views

  • Order = 1

Click Add Layout Update

  • Display on: All Pages

  • Container: Page Header Container

Click on the Widget Options tab
Click on the button Select Block

  • Select your block: Menu navigation header bar

Click on Save (top right orange button)

Update cache:

[root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php bin/magento cache:flush

 

View Magento public home page

 

View Magento public New page

 

View Magento public Wine page (grid view)

 

View Magento public Wine page (list view)

 

View Magento public product detail page

 

Config Shipping

Stores > Config > Sales > Shipping Methods

Flat Rate > Enabled = No

Free Shipping > Enabled = Yes
Free Shipping > Title = Entrega en Argentina gratis
Free Shipping > Method Name = Costaflores (gratis)
Free Shipping > Ship to Applicable Countries = Specific Countries
Free Shipping > Ship to Specific Countries = Argentina

 

Magento Backup before installing extensions

[root@localhost /]# cd /home/magento/
[root@localhost magento]# mkdir backup-2018-01-12
[root@localhost magento]# cd backup-2018-01-12/
[root@localhost backup-2018-01-12]# systemctl stop httpd
[root@localhost backup-2018-01-12]# tar cvfz magento-Costaflores-2018_01_12.tar.gz /var/www/html/magento-costaflores/
[root@localhost backup-2018-01-12]# mysqldump -p -u usermagento magento21costaflores > magento21costaflores.sql (password c0$t4fl0r3$ )

 

Install Bitpay module

Module page link GitHub - bitpay/magento2-plugin: Magento2.x payment plugin for Bitpay.com

Create a new folder:

[root@localhost /]# cd /home/magento/ [root@localhost magento]# mkdir Bitpay-module [root@localhost magento]# cd Bitpay-module/

Download the module and unzip:

[root@localhost Bitpay-module]# wget https://github.com/bitpay/magento2-plugin/releases/download/v1.0.5/Bitpay_Core-1.0.5.zip [root@localhost Bitpay-module]# unzip Bitpay_Core-1.0.5.zip

Install module :

[root@localhost Bitpay-module]# cp -rT app/ /var/www/html/magento-costaflores/app/ [root@localhost Bitpay-module]# cp -rT lib/ /var/www/html/magento-costaflores/lib/ [root@localhost Bitpay-module]# cd /var/www/html/ [root@localhost html]# chown apache:apache magento-costaflores/ -R [root@localhost ~]# cd /var/www/html/magento-costaflores/ [root@localhost magento-costaflores]# php -f bin/magento setup:upgrade [root@localhost magento-costaflores]# php -f bin/magento setup:di:compile Compilation was started. %message% 0/7 [>---------------------------] 0% 1 sec 42.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 42.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 42.0 MiB Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 46.0 MiB Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 46.0 MiB Repositories code generation... 2/7 [========>-------------------] 28% 20 secs 138.0 MiB Service data attributes generation... 2/7 [========>-------------------] 28% 20 secs 138.0 MiB Service data attributes generation... 3/7 [============>---------------] 42% 20 secs 140.0 MiB Application code generator... 3/7 [============>---------------] 42% 20 secs 140.0 MiB Application code generator... 4/7 [================>-----------] 57% 35 secs 156.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 35 secs 156.0 MiB Interceptors generation... 5/7 [====================>-------] 71% 50 secs 174.0 MiB Area configuration aggregation... 5/7 [====================>-------] 71% 50 secs 174.0 MiB Area configuration aggregation... 6/7 [========================>---] 85% 2 mins 248.0 MiB Interception cache generation... 6/7 [========================>---] 85% 2 mins 248.0 MiB Interception cache generation... 7/7 [============================] 100% 2 mins 248.0 MiB Generated code and dependency injection configuration successfully. [root@localhost magento-costaflores]# [root@localhost magento-costaflores]# systemctl start httpd [root@localhost magento-costaflores]#


In admin interface, go to Stores > Configuration > Advanced > advanced, turn enabled 'Bitpay_Core'
In admin interface, go to System > Cache Management and Flush the Flush Magento Cache.

Then in Stores > Configuration > Sales > Payment Methods, you should have Bitpay as a payment method:

 

 

Display the current mode:
*************************
[root@localhost ~]# cd /var/www/html/magento-costaflores/
[root@localhost magento-costaflores]# php bin/magento deploy:mode:show


Set developer mode in Magento 2:
********************************

  1. If you’re changing from production mode to developer mode, delete the contents of the var/generation and var/di directories:

[root@localhost ~]# cd /var/www/html/magento-costaflores/
[root@localhost magento-costaflores]# rm -rf var/di/* var/generation/*

  1. Set the mode:

[root@localhost magento-costaflores]# php bin/magento deploy:mode:set developer


Disable developer mode in Magento 2 (Change to production mode):
****************************************************************
[root@localhost ~]# cd /var/www/html/magento-costaflores/
[root@localhost magento-costaflores]# php bin/magento deploy:mode:set production


Enable or disable maintenance mode:
***********************************
[root@localhost ~]# cd /var/www/html/magento-costaflores/
[root@localhost magento-costaflores]# php bin/magento maintenance:status
[root@localhost magento-costaflores]# php bin/magento maintenance:enable [--ip=<ip address> ... --ip=<ip address>] | [ip=none]
[root@localhost magento-costaflores]# php bin/magento maintenance:disable [--ip=<ip address> ... --ip=<ip address>] | [ip=none]

  • Acceso al servidor para el nuevo magento por parte Mike Barrow y antes de 28 Dec 2017