magento2
Tema personalizado
Buscar..
Observaciones
luma
tema como padre
{
"name": "magento/luma",
"description": "N/A",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/theme-luma": "100.0.*",
"magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
al final
Ejecute la php bin/magento setup:upgrade
este comando después de lo que a continuación también se necesitan los comandos
php bin/magento setup:static-content:deploy <language_pack_1> <language_pack_2> ... <language_pack_n>
- <language_pack>:
en_US
nl_NL
en_GB
etc.
- <language_pack>:
php bin/magento cache:flush
ophp bin/magento cache:clean
Tema de muestra
Theme.xml
app/design/frontend/Magento/mytheme/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My theme</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>
app/design/frontend/Magento/mytheme/composer.json
{
"name": "magento/theme-frontend-blank",
"description": "N/A",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/theme-frontend-blank": "100.0.*",
"magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
app/design/frontend/Magento/mytheme/registration.php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Magento/mytheme',
__DIR__
);
al final
php bin/magento setup:upgrade
Modified text is an extract of the original Stack Overflow Documentation
Licenciado bajo CC BY-SA 3.0
No afiliado a Stack Overflow