Different ways of creating shopware 5 theme ?

Create Shopware 5 Theme In Different Ways

There are 3 different ways to create theme in shopware 5.

  1. Admin
  2. Command
  3. Code

To create theme on different ways follow the following steps.

First we will be creating theme through Admin.

Step 1: Login to the admin panel and go to the Configuration>Theme Manager.

Step 2: Click on the Create theme to create new one.

Step 3: Fill the required fields and save the theme.

Note:

  1. Extension of: You can select which theme to use as a parent theme.
  2. Name: Name of the theme.
  3. Short description: You can give description to your theme that will appear within the theme manager.

Step 4: Click on the Save button to save the new theme.

Results:

Now we will create theme using command.

Step 1: Go to the Terminal application and connect with your shopware server. Then run the below command

php bin/console sw:theme:create –description=”Text” –author=”Name of author” –license=”MIT” Responsive ThemeDirectory Theme

Note: Make sure you are inside shopware root directory.

/shopware> // like mine.

Step 2: Go to the Theme Manager to check newly created theme.

Now let’s create theme manually using Code.

Step 1: Go to shopware root directory of your website.

Step 2: Create a new folder in ‘themes>Frontend’ directory.

File Structure

themes>Frontend>Bay20 // Bay20 is a theme name

Step 3: Create file Theme.php in Bay20 theme directory.

Step 4: Go to Theme.php and paste below code.

<?php

namespace Shopware\Themes\Bay20;

class Theme extends \Shopware\Components\Theme
{
protected $extend = 'Responsive';
protected $name = 'Bay20';
protected $description = '';
protected $author = '';
protected $license = '';
}

Step 5: Now go to Theme manager in admin panel. To check newly created theme.

Note: You can copy the theme image of Responsive and paste it to the Bay 20 directory. Or you can add the image of this size 133*98

Result:

Please contact us at manish@bay20.com or call us at +91-8800519180 for any support related to shopware 5. You can also visit the Shopware 5 development page to check the services we offer.