Más contenido relacionado La actualidad más candente (9) Similar a Running Magento 1.x Extension on Magento 2 (20) Más de Sergii Shymko (12) Running Magento 1.x Extension on Magento 23. Legal
Copyright © 2014 Magento, Inc. All Rights Reserved.
Magento®, eBay Enterprise™ and their respective logos are trademarks, service marks,
registered trademarks, or registered service marks of eBay, Inc. or its subsidiaries. Other
trademarks or service marks contained in this presentation are the property of the
respective companies with which they are associated.
This presentation is for informational and discussion purposes only and should not be
construed as a commitment of Magento, Inc. or GSI Commerce, Inc. d/b/a eBay Enterprise
(“eBay Enterprise”) or of any of their subsidiaries or affiliates. While we attempt to ensure
the accuracy, completeness and adequacy of this presentation, neither Magento, Inc.,
eBay Enterprise nor any of their subsidiaries or affiliates are responsible for any errors or
will be liable for the use of, or reliance upon, this presentation or any of the information
contained in it. Unauthorized use, disclosure or dissemination of this information is
expressly prohibited.
5. Subject Extension
Vertical Navigation with CSS Classes
magentocommerce.com/magento-connect/vertical-navigation-with-css-classes.html
As of May 8, 2014
53,528
Rico Neitzel
Vinai Kopp
Raúl Fishman
OSL 3.0
10. Magento 1.x Magento 2
Directory Structure
app/
code/
community/
<Vendor>/<Module>/
etc/modules/
locale/<locale>/
design/
<area>/base/default/
skin/
<area>/base/default/
app/
code/
<Vendor>/<Module>
/
etc/
i18n/<locale>/
view/<area>/
12. Magento 1.x Magento 2
Config Reorganization
app/
code/community/
RicoNeitzel/VertNav/
etc/
config.xml
app/
code/
RicoNeitzel/VertNav/
etc/[<area>/]
module.xml
…
…
16. Magento 1.x Magento 2
Static Files
skin/
frontend/
base/
default/
vertnav.css
app/
code/
RicoNeitzel/VertNav/
view/
frontend/
style.css
17. Magento 1.x Magento 2
Templates
app/
design/
frontend/
base/default/
template/
vertnav/
left.phtml
app/
code/
RicoNeitzel/VertNav/
view/
frontend/
left.phtml
18. Magento 1.x Magento 2
Layout Files
app/
design/
frontend/
base/default/
layout/
vertnav.xml
app/
code/
RicoNeitzel/VertNav/
view/
frontend/
layout/
default.xml
…
22. Magento 1.x Magento 2
Core Reorganization
app/
code/core/
Mage/
Adminhtml/
Page/
Core/
Mage.php
lib/Varien/
app/
code/
Magento/
Backend/
Theme/
Core/
Store/
lib/Magento/Framework/
28. Magento 1.x Magento 2
Dictionaries
app/
locale/
de_DE/
RicoNeitzel_VertNav.csv
es_MX/
RicoNeitzel_VertNav.csv
app/
code/
RicoNeitzel/VertNav/
i18n/
de_DE.csv
es_MX.csv
29. Magento2Magento1.x
Localization via “gettext”
class Vendor_Module_Helper_Data
extends Mage_Core_Helper_Abstract
{
// Literally empty
}
echo Mage::helper('module')->__('Wake up, %s...', 'Neo');
echo __('Wake up, %1...', 'Imagine attendee');
Module Context
Global Function
32. Effort & Gains
20 hours
Single module dir
Config validation
Unit testable
19 commits
Notas del editor Uses various framework parts
Not trivial Magento 1.x – module in 5 directories
Magento 2 – module in 1 directory
<module_dir>/ = <Vendor>/<Module>/ Merging preserved
XSD validation Convention over configuration PSR compliance No class “Mage”
Confusion ;) Convention over configuration XSD validation of config