Reputation: 11
After installing Magento 2 with composer and importing sample data, I would like to create a new theme. I'm following the frontend developer guide but when I apply my new theme, I can't see any of my products in categories. The left menu with filters is still here but no products are displayed.
Any solution for me please ?
PS: Sorry for my english...:)
Upvotes: 0
Views: 992
Reputation: 556
I had the same problem, the issue was the /etc/view.xml file on my custom theme. I deleted the file and worked fine.
Upvotes: 0
Reputation: 11
Here are my files
registration.php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/OORun/running',
__DIR__
);
theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Running</title>
<parent>Magento/blank</parent>
<media>
<preview_image></preview_image> <!-- the path to your theme's preview image -->
</media>
</theme>
no products
Edit : I found that the problem is related to /etc/view.xml
<images module="Magento_Catalog">
<image id="category_page_grid" type="small_image">
<width>150</width>
<height>150</height>
</image>
</images>
When I delete this file, all products are displayed correctly. I have just copied the documentation example, I don't understand what I did wrong...
Upvotes: 1
Reputation: 316
The luma theme is built with 'cms' features. They are defined in the backend in
Content -> Widgets
For example the widget "Home Page". To use the same "Home Page" widget with your custom theme you have to add a new one with the same parameter from the luma "Home Page" widget except the "Design Package/Theme" parameter, which is now your custom theme.
In general the widgets are linked to a theme name.
Upvotes: 0