0

I have worked in magento 1.8.Now I have installed magento 2.0.2 in localhost.I have one theme named Ultimo which i want to apply in magento 2.0.2.This theme is not from magentocommerce.com.

I cant see My theme name here.

I cant see My theme name here.

Then How to select theme from here? What are the steps to apply a theme?

I have tried all the steps from http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html more than one time.But still not working.

Here are all my files.

theme.xml

Path : D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Ultimo</title>
    <parent>Magento/ultimo</parent>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

composer.json

Path: D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/composer.json

{
    "name": "magento/ultimo",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-luma": "100.0.*",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}   

registration.php

Path : Path: D:/wamp/www/testsite/app/design/frontend/Magento/ultimo/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/ultimo',
    __DIR__
);?>

Can anyone help me ?

  • 1
    It's seem that you are trying to install Magento 1.x theme in Magento 2.x, right ? – Arunendra Feb 16 '16 at 5:05
2

Copy the Ultimo files to directory and run the Commands below in the order given consecutively:

  1. php bin/magento module:enable Infortis_Base Infortis_Brands Infortis_Cgen Infortis_Dataporter Infortis_Infortis Infortis_Ultimo Infortis_UltraMegamenu Infortis_UltraSlideshow
  2. php bin/magento setup:upgrade
  3. php bin/magento setup:di:compile
  4. php bin/magento setup:static-content:deploy
0

You can reference magento2 docs file from here, you have to go step by step using this docs, http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html

in your theme.xml file,

parent tag must be <parent>Magento/blank</parent> or <parent>Magento/luma</parent>

Because already two themes are installed in magento 2. so you can extends one of those theme.

Another step is: Go to magento2/dev/tools/grunt/configs/theme.js

add below code after

luma: {
        area: 'frontend',
        name: 'Magento/luma',
        locale: 'en_US',
        files: [
            'css/styles-m',
            'css/styles-l'
        ],
        dsl: 'less'
    },

setup your custom theme code declaration,

ultimo: {
    area: 'frontend',
    name: 'Magento/ultimo',
    locale: 'en_US',
    files: [
        'css/styles-m',
        'css/styles-l'
    ],
    dsl: 'less'
},

Now remove var folder from root , refresh cache and apply command in cli from root,

php bin/magento setup:static-content:deploy

set developer mode using cli,

php bin/magento deploy:mode:set developer

Now your theme are display inside admin. Thanks.

  • Please look at my edited question and answer me if i did any mistake in code. – Nikita Tailor Feb 16 '16 at 5:37
  • If I change <parent>Magento/ultimo</parent> to <parent>Magento/blank</parent>.Then "There has been an error processing your request.Exception printing is disabled by default for security reasons.Error log record number: 1821599746" error occures. – Nikita Tailor Feb 16 '16 at 6:02
  • Whn I apply above command in command promt, this error is shown.'php' is not recognized as an internal or external command,operable program or batch file. – Nikita Tailor Feb 16 '16 at 6:10
0

Please place your theme directory under app/design/

Please remove var directory and pub/static/frontend/content from magento folder then use this commands in cmd. php bin/magento setup:cache:clean php bin/magento setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.