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...:)
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...
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.
I had the same problem, the issue was the /etc/view.xml file on my custom theme.
I deleted the file and worked fine.
Related
I am new to Magento.
I am creating Magenta 2 site, I have managed to install Magento, and for it to use the luma theme.
I want to be able to edit the theme (through Inheritance), I understand it uses XML files to design the layout, how do I change these, should they be in the new theme folder, and change them there?
If so, where do I get the origonal Luma xml files, or does magento create these? - There are no themes within the app/ folder, is it here where I create the new theme (that inherits from Luma)?
Many thanks for any help, I am completely new to Magento.
You have to create a custom theme and make theme.xml and set a parent to LUMA.
Now app/design/frontend/customthemename
So anything that you want to customized used in customthemename folder
Thanks
You should create a child theme to edit XML file. To create a child theme, there are 3 steps to do:
Firstly, create a new theme directory in app/design/frontend.
Secondly, declare the new theme by:
Creating theme.xml: this file identifies the name, parent and other
basic info of the new theme.
Creating Composer.json: this file is used to install the theme via Composer later.
Creating registration.php: this file is required in any Magento 2 Extension
and Themes.
Creating static files directories: this folder is used to store CSS, JS, image files.
Creating logo folder: this folder contains files that determine the location and size of your new theme logo.
Thirdly, apply and configure theme in admin: - Run Upgrade Command. - Apply the theme. - Deploy.
For more detailed tutorial, go to Guide to create Magento 2 theme.
The original XML files of any module and themes are located in vendor/magento//view/frontend/layout, with the module_name is the module related to the XML file you want to edit.
For example, with homepage CMS, the XML file is located in vendor/magento/module-cms/view/frontend/layout
I want to add extension - All Category Product Carousel in my Magento Website and it has RWD theme.The components of the extension are by default installing in:
app/design/frontend/default/default/layout
app/design/frontend/default/default/template
skin/frontend/default/default
I have moved the components in my theme folder i.e. RWD, and components are now in the following folders:
app/design/frontend/rwd/default/layout
app/design/frontend/rwd/default/template
skin/frontend/rwd/default
But after this also the extension is not working. I am new to Magento so does not know much things about it. Does anything else be done?
The products are there but css and js is not getting applied on them. The data is showing like: Please View Here
You can paste your extension key here. Now you can check if you have copied all the files to RWD.
The extension tell to insert below block in cms page. Include it in your cms->home page.
{{block type="pcarousel/pcarousel" pcarousel_id="carousel id" template="pcarousel/pcarousel.phtml"}}
After that navigate to system->permission->blocks->Add new block and add the type pcarousel/pcarousel there and allow it.
The css and js files were not loading in the main page, have added them externally. Now working
On other pages of websites the css path is
http://xxx/magento_raw/skin/frontend/rwd/default/css/styles.css
But on product page it is
http://xxx/magento_raw/skin/frontend/base/default/css/styles.css
Why magento is taking css from base folder on product page.
Go to: Settings -> Configuration - General -> Design then set the Design Tab accordingly to your theme.
please use this code
your theme/layout/etc/theme.xml
<theme>
<parent>yourtheme/default</parent>
</theme>
use your theme name than it will access css file from your theme...
I have a problem with magento 1.7 (WYSIWYG).
My problem is that I can't have a proper description of the product when I use the WYSIWYG.
For example if I write in the WYSIWYG my product description, on site web site I will have a presentation which isn't the same.
The WYSIWYG puts html tags for each line return.
Thank you for your help
I've found in the past that with some themes the description is run through the nl2br function first. This will replace all new lines with <br> tags. Look in your view.phtml template file for this and remove the nl2br function.
It could be that you have custom css on the front causing it to appair different, view source both the admin (WYSIWYG) and on the website to see if the html are the same. If they are the same then check your custom css
In the file description.phtml in the template/easytabs folder, I removed the nl2br.
And then it works fine.
Can someone verify what I think is what's happening with Magento's fallback theme hierarchy.
The final fall-back point is the /base/default/ theme.
Within your interface/package (they are the same things right?), your default theme is selected at, from the Magento admin page, System->Configuration->General->Design->Themes->"B" ("B" is an example name of the theme).
On top of your default package theme, you can select an active theme from System->Design->"A".
So with this setup, Magento will look into "A" first, then in "B", then finally resort to base/default if neither A or B has files it needs.
Correct or no? TIA!
Sorta.
The fall-back hierarchy in Magento CE v1.4+ and EE v1.8+ is as follows.
Look for requested file in:
app/design/frontend/custom_package/custom_theme/
skin/frontend/custom_ package/custom_theme
If not found, look for requested file in:
app/design/frontend/custom_package/default
skin/frontend/custom_package/default
If not found, look for requested file in:
app/design/frontend/base/default
skin/frontend/base/default
If not found, a rendering error will occur.
Source: Magento's Theme Hierarchy - Changes in CEv1.4 and EEv1.8
I will do my best to clarify some points for you.
If you are not using a child theme, magneto will use /base/, however if you have a child theme active, magneto will use your custom theme files.
For example, If your new theme file has a header.phtml file but not footer.phtml, Magento will automatically fall back to the base. this is why its never smart to edit core files