ݺߣ

ݺߣShare a Scribd company logo
Magento 2 Frontend le novità - Meet Magento 2015
ANDREA SACCÀ
Follow me! @andreasacca @magentiamo
Web Designer & Frontend Developer,
Sviluppatore Frontend Certificato Magento,
Autore del libro Mastering Magento Theme Design,
CEO & Founder 1604lab S.R.L.
Ideatore e Fondatore di Magentiamo.it
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Magento 2
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Introduzione a Magento2
Le Novità del Front End
Creare un Tema per Magento2
Le Novità del Design del Back End
Risorse Utili
Magento 2
1
2
3
4
5
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Introduzione a
Magento2
1
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
REQUISITI DI SISTEMA per Magento2
Guida all’installazione --> http://goo.gl/qdgA7X
Apache: 2.2 or 2.4
PHP: >=5.4.11 o 5.5.x
MySQL: 5.6.x
Introduzione a Magento21
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Introduzione a Magento21
Quando uscirà Magento 2?
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Introduzione a Magento21
https://github.com/magento/magento2
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Introduzione a Magento21
COMPOSER - https://getcomposer.org/
{
“name”: “magentiamo/theme-frontend-yuki”,
“description”: “Super Duper Theme for Magento2”,
“require”: {
“php”: “~5.4.11|~5.5.0”,
“magento/theme-frontend-blank”: “0.42.0-beta1”,
“magento/framework”: “0.42.0-beta1”,
“magento/magento-composer-installer”: “*”
},
“type”: “magento2-theme”,
“version”: “0.42.0-beta1”,
“license”: [
“OSL-3.0”,
“AFL-3.0”
],
“extra”: {
“map”: [
[
“*”,
“Magentiamo/Yuki”
]
]
}
ESEMPIO FILE COMPOSER.JSON
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del
Front End
2
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
Struttura Frontend MAGENTO 1.x
ROOT
|--- APP
| |--- design
| | |--- frontend
| | |--------| package
| | |--------| theme
ROOT
|--- SKIN
| |--- frontend
| | |--- package
| | |--------| theme
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
Struttura Frontend MAGENTO 2
ROOT
|--- APP
| |--- design
| | |--- frontend
| | |--------| package
| | |--------| theme
ROOT
|--- SKIN
| |--- frontend
| | |--- package
| | |--------| theme
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
Struttura Frontend MAGENTO 2
MAGENTO 2
|--- APP
| |--- design
| | |--- frontend
| | |--------| package
| | |--------| theme
WEB
|--- css
|--- fonts
|--- images
|--- js
THEME
|--- etc
|--- media
|--- web
|--- composer.json
|--- theme.xml
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
view.xml - Un file per le dimensioni delle immagini
...
<var name=”category_page_grid:type”>small_image</var>
<var name=”category_page_grid:width”>250</var>
<var name=”category_page_grid:ratio”>1</var>
<var name=”category_page_grid:height”>250</var>
...
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
MODULO (Es. Catalog)
|--- view
| | |--- adminhtml
| | |--- base
| | |--- frontend
| | | |--- layout
| | | |--- templates
| | | |--- web
XML
PHTML
IMG, JS, CSS
“View” Integrata nel modulo
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
XML PAGE LAYOUT - Wireframe della Pagina
<CONTAINER>	 ------------------------------> Blocco Struttura
<REFERENCECONTAINER> Per definire il blocco “Madre”
! THE <ACTION> INSTRUCTION IS DEPRECATED. DO NOT USE IT!
<MOVE> Per spostare un blocco da un contenitore ad un altro
<REMOVE> Per eliminare un blocco
<UPDATE> Per aggiornare gli “handle”
magento2/app/code/Magento/Theme/view/frontend/page_layout/2columns-left.xml
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
XML PAGE LAYOUT - Wireframe della Pagina
<layout xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLoca-
tion=”../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_layout.xsd”>
<update handle=”1column”/>
<referenceContainer name=”columns”>
<container name=”div.sidebar.main” htmlTag=”div” htmlClass=”sidebar sidebar-main” after=”main”>
<container name=”sidebar.main” as=”sidebar_main” label=”Sidebar Main”>
		<remove name=”report.bugs”/>
	<container>
</container>
		<move element=”name.of.an.element” destination=”name.of.destination.element” as=”new_
alias” after=”name.of.element.after” before=”name.of.element.before”/>
</referenceContainer>
</layout>
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
XML PAGE LAYOUT - Esempio Inserimento CSS
<referenceContainer name=”head”>
<block class=”MagentoThemeBlockHtmlHeadCss” name=”css-name”>
<arguments>
<argument name=”file” xsi:type=”string”>css/styles.css</argument>
</arguments>
</block>
</referenceContainer>
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
Finalmente... JQUERY!
JQUERY 1.8.2
JQUERY NO CONFLICT
JQUERY LOADER WIDGET
JQUERY TABS WIDGET
JQUERY TRANSLATEINLINE WIDGET
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
LESS: Il Preprocessore per il CSS “Dinamico”
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
MAGENTO UI Library
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
RWD: Responsive Web Design
Le novità del Front End MAGENTO 22
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
I Temi di default di Magento 2: BLANK
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End MAGENTO 22
I Temi di default di Magento 2: LUMA
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End2
Traduzioni Magento 2: Il Dizionario
Nuova posizione per i file csvMAGENTO2
|--- APP
| |--- i18n
| | |--- Magento
| | |--------| it_it
| | | |-------- language.xml
| | | |-------- composer.json
| | | |-------- *.csv
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End2
CSV Traduzioni Magento 1.x
1. “Testo/Frase Originale”,”Traduzione”
2. “Add New Block”,”Aggiungi nuovo blocco”
3. “Add New Page”,”Aggiungi Nuova Pagina”
4. “All Countries”,”Tutte le Nazioni”
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Le novità del Front End2
CSV Traduzioni Magento 1.x
1. “Testo/Frase Originale”,”Traduzione”,”Meta Info 1”,”Meta Info 2”
2. “Add New Block”,”Aggiungi nuovo blocco”,”module”,”Mage_Cms”
3. “Add New Page”,”Aggiungi Nuova Pagina”,”theme”,”blank”
4. “All Countries”,”Tutte le Nazioni”,”theme”,”blank”
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Creare un Tema
Magento2
3
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Creare un Tema MAGENTO 23
1. Crea la cartella del “Vendor” in
MAGENTO2/app/design/frontend/Magentiamo
2. Al suo interno crea la cartella del “Theme”
MAGENTO2/app/design/frontend/Magentiamo/Yuki
3. Crea un’immagine THEME/media/preview.jpg del tema
4. Dichiara il tema: Crea il file theme.xml nella cartella del tema
<theme xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:noNamespaceSchemaLocation=”../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd”>
<title>Magentiamo - Yuki</title> <!-- your theme’s name -->
<parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
<media>
<preview_image>media/preview.jpg</preview_image> <!-- the path to your theme’s preview image -->
</media>
</theme>
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Creare un Tema MAGENTO 23
5. Definisci la dimensione delle immagini in THEME/etc/view.xml
6. Crea la cartella “web”per i files statici
MAGENTO2/app/design/frontend/Magentiamo/Yuki/web
7. Crea il file composer.json
{
“name”: “magentiamo/theme-frontend-yuki”,
“description”: “Super Duper Theme for Magento2”,
“require”: {
“php”: “~5.4.11|~5.5.0”,
“magento/theme-frontend-blank”: “0.42.0-beta1”,
“magento/framework”: “0.42.0-beta1”,
“magento/magento-composer-installer”: “*”
},
“type”: “magento2-theme”,
“version”: “0.42.0-beta1”,
“license”: [
“OSL-3.0”,
“AFL-3.0”
],
“extra”: {
“map”: [
[
“*”,
“Magentiamo/Yuki”
]
]
}
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
8. Controlla che il tema venga riconosciuto da Magento
in ADMIN:Content > Design > Themes.
Creare un Tema MAGENTO 23
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Creare un Tema MAGENTO 23 Creare un Tema MAGENTO 23
9. Attiva il tema in ADMIN: Stores > Configuration > Design
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Novità del Design
del Back End
4
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Novità del Design del Backend MAGENTO 24
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Novità del Design del Backend MAGENTO 24
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Risorse utili per
Magento2
5
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
Magento 2 Documentation
https://magento.com/developers/magento2
Ben Marks
Magento Community Evangelist
http://bhmarks.com/blog/
GitHub Magento2
https://github.com/magento/magento2
Alan Kent
Chief Magento 2 Architect
https://alankent.wordpress.com/category/magento/
Magentiamo.it
http://www.magentiamo.it/magento2
Risorse Utili MAGENTO 25
2MAGENTO
Magento2: Tutte le novità per lo sviluppo Front End
ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
GRAZIE.DOMANDE?

#mmit2015 Le novità del FrontEnd in #Magento2
@andreasacca @MeetMagentoIt
?
Ad

Recommended

Creare un tema Responsive per Magento con Bootstrap
Creare un tema Responsive per Magento con Bootstrap
Andrea Saccà
Magento2 Training
Magento2 Training
Andrea Saccà
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
5 falsi miti su Woocommerce - Andrea Cardinali - WordCamp Catania 2019
Andrea Cardinali
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali - SEO on Site e WordPress Errori da Evitare
Andrea Cardinali
4+1 Errori SEO Fatali per il tuo sito WordPress
4+1 Errori SEO Fatali per il tuo sito WordPress
Andrea Cardinali
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
WordPress - 9 Falsi miti smascherati - Andrea Cardinali - WordPress Romagna M...
Andrea Cardinali
William Sbarzaglia - Real time analytics nell’e-commerce con Magento
William Sbarzaglia - Real time analytics nell’e-commerce con Magento
Meet Magento Italy
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Meet Magento Italy
Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Alessandro Montalti
Luca Peressini - 20 moduli in 20 minuti
Luca Peressini - 20 moduli in 20 minuti
Meet Magento Italy
Come sviluppare un e-commerce con Magento
Come sviluppare un e-commerce con Magento
Commit University
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
MageSpecialist
Magento: la piattaforma eCommerce per conquistare il mondo
Magento: la piattaforma eCommerce per conquistare il mondo
festival ICT 2016
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Meet Magento Italy
Magento VS Prestashop
Magento VS Prestashop
Gianmario Deriu
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
Francesco Terenzani
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Claudio Ancillotti
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
Ecommerce HUB
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MageSpecialist
Zurb workshop
Zurb workshop
Commit University
10 aspetti SEO da non trascurare mai in un E-commerce
10 aspetti SEO da non trascurare mai in un E-commerce
Bizup
Mauro Lorenzutti: Quale CMS per Magento?
Mauro Lorenzutti: Quale CMS per Magento?
Meet Magento Italy
Web marketing - parte 2
Web marketing - parte 2
FormaLms
Corso Base Wordpress 22-40 | installazione (2 di 4)
Corso Base Wordpress 22-40 | installazione (2 di 4)
armandocarcaterra
Moduli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarli
Stefano Valle
Presentazione Travel Camp
Presentazione Travel Camp
Davide Del Monte
15 - Web designer vs Web developer
15 - Web designer vs Web developer
Giuseppe Vizzari
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
midimarcus

More Related Content

Similar to Magento 2 Frontend le novità - Meet Magento 2015 (20)

Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Alessandro Montalti
Luca Peressini - 20 moduli in 20 minuti
Luca Peressini - 20 moduli in 20 minuti
Meet Magento Italy
Come sviluppare un e-commerce con Magento
Come sviluppare un e-commerce con Magento
Commit University
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
MageSpecialist
Magento: la piattaforma eCommerce per conquistare il mondo
Magento: la piattaforma eCommerce per conquistare il mondo
festival ICT 2016
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Meet Magento Italy
Magento VS Prestashop
Magento VS Prestashop
Gianmario Deriu
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
Francesco Terenzani
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Claudio Ancillotti
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
Ecommerce HUB
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MageSpecialist
Zurb workshop
Zurb workshop
Commit University
10 aspetti SEO da non trascurare mai in un E-commerce
10 aspetti SEO da non trascurare mai in un E-commerce
Bizup
Mauro Lorenzutti: Quale CMS per Magento?
Mauro Lorenzutti: Quale CMS per Magento?
Meet Magento Italy
Web marketing - parte 2
Web marketing - parte 2
FormaLms
Corso Base Wordpress 22-40 | installazione (2 di 4)
Corso Base Wordpress 22-40 | installazione (2 di 4)
armandocarcaterra
Moduli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarli
Stefano Valle
Presentazione Travel Camp
Presentazione Travel Camp
Davide Del Monte
15 - Web designer vs Web developer
15 - Web designer vs Web developer
Giuseppe Vizzari
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
midimarcus
Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Corso Ecommerce Magentiamo 2015, Montalti - "Funzionalità avanzate: integrazi...
Alessandro Montalti
Luca Peressini - 20 moduli in 20 minuti
Luca Peressini - 20 moduli in 20 minuti
Meet Magento Italy
Come sviluppare un e-commerce con Magento
Come sviluppare un e-commerce con Magento
Commit University
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
MageSpecialist
Magento: la piattaforma eCommerce per conquistare il mondo
Magento: la piattaforma eCommerce per conquistare il mondo
festival ICT 2016
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Mauro Lorenzutti - Cambiare piattaforma ecommerce: quali aspetti considerare ...
Meet Magento Italy
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
WPO: Ottimizzazione step-by-step del front-end di un e-commerce
Francesco Terenzani
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Problemi con Magento? Magento Store Manager ti aiuta. Compra online i servizi...
Claudio Ancillotti
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
[eh2024] - Magento è tornato: come Hyvä sta ridisegnando il panorama dell'Eco...
Ecommerce HUB
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MAGENTO 2: Routing e Controllers - Paolo Vecchiocattivi
MageSpecialist
10 aspetti SEO da non trascurare mai in un E-commerce
10 aspetti SEO da non trascurare mai in un E-commerce
Bizup
Mauro Lorenzutti: Quale CMS per Magento?
Mauro Lorenzutti: Quale CMS per Magento?
Meet Magento Italy
Web marketing - parte 2
Web marketing - parte 2
FormaLms
Corso Base Wordpress 22-40 | installazione (2 di 4)
Corso Base Wordpress 22-40 | installazione (2 di 4)
armandocarcaterra
Moduli su Zend Framework 2: come sfruttarli
Moduli su Zend Framework 2: come sfruttarli
Stefano Valle
15 - Web designer vs Web developer
15 - Web designer vs Web developer
Giuseppe Vizzari
Workshop - Sviluppare un e-commerce con Magento
Workshop - Sviluppare un e-commerce con Magento
midimarcus

Magento 2 Frontend le novità - Meet Magento 2015

  • 2. ANDREA SACCÀ Follow me! @andreasacca @magentiamo Web Designer & Frontend Developer, Sviluppatore Frontend Certificato Magento, Autore del libro Mastering Magento Theme Design, CEO & Founder 1604lab S.R.L. Ideatore e Fondatore di Magentiamo.it Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15
  • 3. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Magento 2
  • 4. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Introduzione a Magento2 Le Novità del Front End Creare un Tema per Magento2 Le Novità del Design del Back End Risorse Utili Magento 2 1 2 3 4 5
  • 5. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Introduzione a Magento2 1
  • 6. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 REQUISITI DI SISTEMA per Magento2 Guida all’installazione --> http://goo.gl/qdgA7X Apache: 2.2 or 2.4 PHP: >=5.4.11 o 5.5.x MySQL: 5.6.x Introduzione a Magento21
  • 7. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Introduzione a Magento21 Quando uscirà Magento 2?
  • 8. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Introduzione a Magento21 https://github.com/magento/magento2
  • 9. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Introduzione a Magento21 COMPOSER - https://getcomposer.org/ { “name”: “magentiamo/theme-frontend-yuki”, “description”: “Super Duper Theme for Magento2”, “require”: { “php”: “~5.4.11|~5.5.0”, “magento/theme-frontend-blank”: “0.42.0-beta1”, “magento/framework”: “0.42.0-beta1”, “magento/magento-composer-installer”: “*” }, “type”: “magento2-theme”, “version”: “0.42.0-beta1”, “license”: [ “OSL-3.0”, “AFL-3.0” ], “extra”: { “map”: [ [ “*”, “Magentiamo/Yuki” ] ] } ESEMPIO FILE COMPOSER.JSON
  • 10. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End 2
  • 11. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 Struttura Frontend MAGENTO 1.x ROOT |--- APP | |--- design | | |--- frontend | | |--------| package | | |--------| theme ROOT |--- SKIN | |--- frontend | | |--- package | | |--------| theme
  • 12. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 Struttura Frontend MAGENTO 2 ROOT |--- APP | |--- design | | |--- frontend | | |--------| package | | |--------| theme ROOT |--- SKIN | |--- frontend | | |--- package | | |--------| theme
  • 13. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 Struttura Frontend MAGENTO 2 MAGENTO 2 |--- APP | |--- design | | |--- frontend | | |--------| package | | |--------| theme WEB |--- css |--- fonts |--- images |--- js THEME |--- etc |--- media |--- web |--- composer.json |--- theme.xml
  • 14. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 view.xml - Un file per le dimensioni delle immagini ... <var name=”category_page_grid:type”>small_image</var> <var name=”category_page_grid:width”>250</var> <var name=”category_page_grid:ratio”>1</var> <var name=”category_page_grid:height”>250</var> ...
  • 15. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 MODULO (Es. Catalog) |--- view | | |--- adminhtml | | |--- base | | |--- frontend | | | |--- layout | | | |--- templates | | | |--- web XML PHTML IMG, JS, CSS “View” Integrata nel modulo
  • 16. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 XML PAGE LAYOUT - Wireframe della Pagina <CONTAINER> ------------------------------> Blocco Struttura <REFERENCECONTAINER> Per definire il blocco “Madre” ! THE <ACTION> INSTRUCTION IS DEPRECATED. DO NOT USE IT! <MOVE> Per spostare un blocco da un contenitore ad un altro <REMOVE> Per eliminare un blocco <UPDATE> Per aggiornare gli “handle” magento2/app/code/Magento/Theme/view/frontend/page_layout/2columns-left.xml
  • 17. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 XML PAGE LAYOUT - Wireframe della Pagina <layout xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLoca- tion=”../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_layout.xsd”> <update handle=”1column”/> <referenceContainer name=”columns”> <container name=”div.sidebar.main” htmlTag=”div” htmlClass=”sidebar sidebar-main” after=”main”> <container name=”sidebar.main” as=”sidebar_main” label=”Sidebar Main”> <remove name=”report.bugs”/> <container> </container> <move element=”name.of.an.element” destination=”name.of.destination.element” as=”new_ alias” after=”name.of.element.after” before=”name.of.element.before”/> </referenceContainer> </layout>
  • 18. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 XML PAGE LAYOUT - Esempio Inserimento CSS <referenceContainer name=”head”> <block class=”MagentoThemeBlockHtmlHeadCss” name=”css-name”> <arguments> <argument name=”file” xsi:type=”string”>css/styles.css</argument> </arguments> </block> </referenceContainer>
  • 19. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 Finalmente... JQUERY! JQUERY 1.8.2 JQUERY NO CONFLICT JQUERY LOADER WIDGET JQUERY TABS WIDGET JQUERY TRANSLATEINLINE WIDGET
  • 20. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 LESS: Il Preprocessore per il CSS “Dinamico”
  • 21. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 MAGENTO UI Library
  • 22. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 RWD: Responsive Web Design Le novità del Front End MAGENTO 22
  • 23. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 I Temi di default di Magento 2: BLANK
  • 24. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End MAGENTO 22 I Temi di default di Magento 2: LUMA
  • 25. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End2 Traduzioni Magento 2: Il Dizionario Nuova posizione per i file csvMAGENTO2 |--- APP | |--- i18n | | |--- Magento | | |--------| it_it | | | |-------- language.xml | | | |-------- composer.json | | | |-------- *.csv
  • 26. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End2 CSV Traduzioni Magento 1.x 1. “Testo/Frase Originale”,”Traduzione” 2. “Add New Block”,”Aggiungi nuovo blocco” 3. “Add New Page”,”Aggiungi Nuova Pagina” 4. “All Countries”,”Tutte le Nazioni”
  • 27. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Le novità del Front End2 CSV Traduzioni Magento 1.x 1. “Testo/Frase Originale”,”Traduzione”,”Meta Info 1”,”Meta Info 2” 2. “Add New Block”,”Aggiungi nuovo blocco”,”module”,”Mage_Cms” 3. “Add New Page”,”Aggiungi Nuova Pagina”,”theme”,”blank” 4. “All Countries”,”Tutte le Nazioni”,”theme”,”blank”
  • 28. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Creare un Tema Magento2 3
  • 29. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Creare un Tema MAGENTO 23 1. Crea la cartella del “Vendor” in MAGENTO2/app/design/frontend/Magentiamo 2. Al suo interno crea la cartella del “Theme” MAGENTO2/app/design/frontend/Magentiamo/Yuki 3. Crea un’immagine THEME/media/preview.jpg del tema 4. Dichiara il tema: Crea il file theme.xml nella cartella del tema <theme xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd”> <title>Magentiamo - Yuki</title> <!-- your theme’s name --> <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme --> <media> <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme’s preview image --> </media> </theme>
  • 30. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Creare un Tema MAGENTO 23 5. Definisci la dimensione delle immagini in THEME/etc/view.xml 6. Crea la cartella “web”per i files statici MAGENTO2/app/design/frontend/Magentiamo/Yuki/web 7. Crea il file composer.json { “name”: “magentiamo/theme-frontend-yuki”, “description”: “Super Duper Theme for Magento2”, “require”: { “php”: “~5.4.11|~5.5.0”, “magento/theme-frontend-blank”: “0.42.0-beta1”, “magento/framework”: “0.42.0-beta1”, “magento/magento-composer-installer”: “*” }, “type”: “magento2-theme”, “version”: “0.42.0-beta1”, “license”: [ “OSL-3.0”, “AFL-3.0” ], “extra”: { “map”: [ [ “*”, “Magentiamo/Yuki” ] ] }
  • 31. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 8. Controlla che il tema venga riconosciuto da Magento in ADMIN:Content > Design > Themes. Creare un Tema MAGENTO 23
  • 32. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Creare un Tema MAGENTO 23 Creare un Tema MAGENTO 23 9. Attiva il tema in ADMIN: Stores > Configuration > Design
  • 33. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Novità del Design del Back End 4
  • 34. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Novità del Design del Backend MAGENTO 24
  • 35. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Novità del Design del Backend MAGENTO 24
  • 36. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Risorse utili per Magento2 5
  • 37. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 Magento 2 Documentation https://magento.com/developers/magento2 Ben Marks Magento Community Evangelist http://bhmarks.com/blog/ GitHub Magento2 https://github.com/magento/magento2 Alan Kent Chief Magento 2 Architect https://alankent.wordpress.com/category/magento/ Magentiamo.it http://www.magentiamo.it/magento2 Risorse Utili MAGENTO 25 2MAGENTO
  • 38. Magento2: Tutte le novità per lo sviluppo Front End ANDREA SACCA’ - Meet Magento Italy - @andreasacca #mmit15 GRAZIE.DOMANDE?  #mmit2015 Le novità del FrontEnd in #Magento2 @andreasacca @MeetMagentoIt ?