Change Logo in Magento 2

You will find theme options in Magento 2 in Content > Design: Configuration:

The different rows address the scopes of the same setting. Click on Edit in the first row to edit settings globally or click on Edit in the last row for the current Store View:

 

In Header you can upload the logo:

 

Scope of the Design Configuration

In the Content > Design: Configuration, the scopes are accessible directly from the overview table:

In Stores > Settings: Configuration you access the scopes using the menu on top:

 

Similar Topics:

Color Swatches in Magento 2

To create color swatches in Magento 2, add or edit an attribute in Stores > Attributes: Product, and choose Visual Swatch as Catalog Input Type for Store Owner:

For the visual representation of a swatch, you can use an image or choose a color with the integrated color picker. To submit the color you have chosen, click on the button in the lower right corner:

To make it visible in the category overview, choose Yes for Used in Product Listing in the tab Storefront Properties:

For a preview of a solid color it is much easier to choose color instead of an image to get better results:

In comparison, this is how an image swatch may look like:

Missing Images and Icons in Frontend And Backend Of Magento 2

In frontend you see missing icons and images:

The same in backend:

You can resolve this problems in two steps:

  1. Delete all files in pub/static except for .htaccess.
  2. Search for MaterializationStrategy\Symlink in app/etc/di.xml and replace through MaterializationStrategy\Copy.

Frontend Result:

Backend Result:

Installing Magento 2 on XAMPP – System Requirements and Troubleshooting

The objective of this article is to guide you through Magento 2 installation, while helping to solve typical problems that might occure during this process.

Choosing The Right XAMPP-Version

There are several options for PHP available, but newest version is not the best. According to official system requirements for Magento 2.1 you may use PHP 5.6.5-5.6.x or PHP 7.0.6-7.0.x. Overview of supported versions:

You need to download XAMPP for your operating system with PHP 5.6.x or 7.0.x:

Minimal XAMPP Installation

You do not need FTP Server, Mail Server, Tomcat, Pearl, Webalizer and Sendmail for Magento 2, so you may disable these components to save memory and disk space:

You are also free to disable phpMyAdmin if you use another MySQL client, like MySQL Workbench.

Enable Required PHP Extensions

Magento 2 requires the following PHP extensions: curl, dom, mcrypt, simplexml, spl, xsl, intl, mbstring, ctype, hash, openssl, zip, xmlwriter, gd, iconv.

By default, xsl and intl are disabled in XAMPP. You just need to enable them by uncommenting appropriate lines in xampp/php/php.ini. For that, search for xsl and than for intl and remove the semicolon from the beginning of the line. On Windows you will find (CTRL+F) the following:

;extension=php_xsl.dll

Change this line to:

extension=php_xsl.dll

Do the same for the line with extension=php_intl.dll. Save php.ini and restart Apache.

If you get an error when trying to stop Apache, restart XAMPP Control Panel with Administrator priviledges:

[Apache] Problem killing PID 2724
[Apache] Check that you have the proper privileges

After you have successfully restarted Apache, click on Try Again and proceed to the next installation step:

Create Database

On Windows you can start the command line MySQL client from the directory xampp/mysql with the following command:

mysql -uroot

Alternatively you may use phpMyAdmin, a graphical MySQL client included with XAMPP by default. Create Database with the name of your choice:

mysql> create schema magento21;

Switch back to your browser and enter the database connection data accordingly. Magento 2 does not create any database structure at this step. Because of that, you will see the next installation step shortly after you click on Next:

Magento 2 suggests a cryptic admin path during installation, while in Magento 1.x you had to change it afterwards given security awareness.

If instead nothing happens and you stay in Step 2, please wait 30-60 seconds. The following (or similar) error may appear:

In this case you may find a solution in this article: Step 2: Add a Database – SQLSTATE[HY000] [2002] Connection Timeout.

In Step 4, press C on your keyboard to jump to Central European Standard Time:

We skip to the last step. When you click on Install Now, the database structure and data will be created:

After a while the following screen should appear:

Reset and Restart Installation

If installation progress bar stops, you may find a solution in Magento 2 DevDoc: Installation stops at about 70%. However, patience is the solution in some cases, especially if you are installing Magento 2 with sample data.

In case Apache crashes or something else happens before the database have been completely built, you can reset and restart installation. For that, delete the configuration file app/etc/env.php and drop and create the database:

mysql> drop schema magento21; create schema magento21;

Installation of Magento 2 – Step 2: Add a Database – SQLSTATE[HY000] [2002] Connection Timeout

In the second step of the Magento 2 installation, despite correct login data  database connection fails. After you click on Next nothing happens at all, no loading animation, nothing. But if you wait for 30 seconds (depends on configuration) the error message will appear.

English Version:

SQLSTATE[HY000] [2002] Can't connect to MySQL server on 'localhost' (10060 "Unknown error")

German Version:

SQLSTATE[HY000] [2002] Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.

If you try to connect using the command line client provided with XAMPP, you may experience the same issue:

In addition to that, mysql client does not exit after output, and you cannot kill the process with CTRL+C.

  • Running mysqld as service,
  • Running mysqld as administrator,
  • Running mysql as administrator,
  • Connecting with -h parameter: mysql -uroot -h 127.0.0.1.

If nothing from the list above helps, check if there is any firewall blocking the mysqld (MySQL-Server). Remove all mysqld entries from the list of known programms and restart MySQL-Server.

Similar Topics:

Required parameter ‘theme_dir’ was not passed

You are trying to change the theme in Content > Design: Configuration, but when you save the new setting, no matter which theme you choose, you get the following error:

Something went wrong while saving this configuration: Required parameter 'theme_dir' was not passed

As consequence, the new theme setting is not saved.

An easy solution would be to switch to a functioning theme by updating the setting in the database directly.

  1. Find out, which theme_id a stable theme has:
    SELECT * FROM theme;
  2. Change the value for theme_id for the current store:
    SELECT * FROM core_config_data WHERE path LIKE 'design/theme/theme_id';
    UPDATE ...
  3. Flush configuration cache:
    bin\magento cache:flush config

 

Similar Topics: