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 rewritingDatabase: 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:
Set up your server environment.
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:
Install PHP
Modify privileges:
[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
Restart Apache server:
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:
Add new crontab:
Reindex
Access Admin backend:
Go to Magento Admin Address: http://192.168.1.167/magento-costaflores/admin_1hzodk/
Install new language package (spanish)
Download language package https://github.com/Magento2Translations/language_es_es/archive/master.zip
Create new directories:
Unzip in the new folder /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/
Edit the registration.php file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.
Edit the language.xml file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.
Edit the composer.json file in the /var/www/html/magento-costaflores/app/i18n/magento2translations/es_es/ folder.
Run the following command lines:
Update cache:
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:
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:
Modify Shop config
Admin > Stores > Configuration > General > Store Email Addresses > General Contact.
Set Sender Email to "sales@costaflores.com"
Admin > Stores > Configuration > General > Store Email Addresses > Sales Representative.
Set Sender Email to "sales@costaflores.com"
Admin > Stores > Configuration > General > Store Email Addresses > Customer Support.
Set Sender Email to "sales@costaflores.com"
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:
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
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 =
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:
Modify left footer block:
Content > Blocks Select Edit "Footer Links Block"
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 =
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:
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 https://github.com/bitpay/magento2-plugin
Create a new folder:
Download the module and unzip:
Install module :
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:
********************************
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/*
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