Questions tagged [xml]
Denotes questions about XML files and XML processing.
1,209
questions
3
votes
4
answers
9k
views
Why is my default.xml not working?
I have in my CustomTheme a default.xml file. I tried to get the xml to work and used some of the samples I found here on StackExchange. Non of them are working for me?
So apparently I have done ...
1
vote
1
answer
1k
views
Magento doesn't support camelCase in URL/route?
If you are declaring your router in etc/adminhtml/routes.xml with similar way
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:...
0
votes
1
answer
1k
views
Layout Update XML for Category in Magento 2.3.4
Can anyone help me how to change number of products per page for a SPECIFIC category. I am on magento 2.3.4 and noticed that Layout Update XML does not exist anymore.
0
votes
3
answers
2k
views
I have create system.xml for system config value but not work
I have created one extension now i released i have also need some system config value where user can easily to handle this module. so i have created system.xml in adminhtml folder but its not work ...
4
votes
1
answer
2k
views
Magento 2 Blank Layout Page
I tried to create a new tab in customer edit backend.
First i create the
app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
2
answers
2k
views
How to add view model to existing phtml and block
Is there any possibility to add ViewModel to the existing block and PHTMl file? I'm trying to add ViewModel to the file below.
sales_email_order_renderers
Code:
<?xml version="1.0"?>
&...
0
votes
2
answers
3k
views
DOMDocument::loadXML(): Argument #1 ($source) must not be empty in DomMerger.php
Keep getting this error in exception, no solutions to find on the internet:
DOMDocument::loadXML(): Argument #1 ($source) must not be empty in /vendor/magento/framework/View/Element/UiComponent/Config/...
2
votes
2
answers
3k
views
How to remove Create an Account button on Success Page in Magento 2?
I want to remove Create An Account button with "You can track your order status by creating an account." text on success page in Magento 2.
I have removed checkout.registration block from ...
0
votes
0
answers
41
views
xml update with current category variable
How can I insert "currentcategory" variable instead of 504 in category_ids ?
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
-1
votes
2
answers
37
views
how to add sidebar.additional in search page?
I don't know how to add the sidebar.additional in the search page, can anyone help?
here's what i tried so far in catalogsearch_result_index.xml :
<?xml version="1.0"?>
<!--
/**
* ...
0
votes
1
answer
1k
views
Some of product detail page error- Element 'reference': This element is not expected
When I tried to change or open product I got next message:
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Line: 1
...
0
votes
3
answers
2k
views
Magento 2 how to show custom block before product.info.details and after media
Magento 2.3.5-p2 how to show custom block before product.info.details and after media ?
<div class="product-info-main"></div>
<div class="product media"></div&...
0
votes
3
answers
1k
views
how to add custom container inside product.info.main container in magento 2.3.1
how to add custom container in class="product-info-main" referenceContainer="content" and inside catalog.product.view.xml file
catalog.product.view.xml
<referenceContainer ...
1
vote
2
answers
2k
views
How to override or extend etc/view.xml file in custom module in Magento2?
I would like to override or extend some of gallery setting(view.xml) and catalog image size changes with my custom module.
I have tried to override in app/code/<vendor>/<module>/etc/view....
2
votes
2
answers
1k
views
Set default value on select of page layout in cms_page_form.xml
I would like to set a default value for the select on the page layout when creating a new cms page in Magento 2. The file I'd like to make an extension for is cms_page_form.xml under module-cms > ...
0
votes
4
answers
2k
views
How to give a CSS class via XML?
There is a link in header portion called quick order, I need to add css class for that link but there is no phtml file for that link so I need to add it via xml. Below is the xml file from vendor.
<...
0
votes
1
answer
2k
views
How to make checkout page 2columns-left on magento 2
I try to make the checkout page 2columns-leftlayout, but i can't.
If i add this code in checkout_index_index.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
layout="2columns-...
1
vote
3
answers
837
views
Move add to cart to below price (and above description) Magento 2.2.5
How can I move the add to cart button immediately below the price in Magento 2? I presume it's an XML update but I am unsure of the code required.
I want to move it from under the description to ...
0
votes
1
answer
2k
views
Magento 2: Warning: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document
I am using Magento 2.0 I have learned magento2 tutorials(No frills magento2 layout) of alan storm. I have created two XML files. when I run the controller file then give the following error
Warning: ...
0
votes
1
answer
1k
views
How to move add to wishlist button next to add to cart button [blank theme]
How can I go about moving the Add to Wish List Button next to the add to cart button? I can get the wishlist button to dissapear which I definitely don't want, but I can not get it to move next to ...
0
votes
2
answers
5k
views
Add js in head in magento 1.9
All js script are loaded in footer in magento 1.9. I want them in head.
Can Anyone let how to do this ?
2
votes
1
answer
1k
views
Magento 2 - Move Block Not Working
I've created a faqs.xml for a bespoke page template and this is my code:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
0
votes
1
answer
2k
views
Magento 2: Change UI template
For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/...
0
votes
4
answers
1k
views
How add text in custom theme header magento 2
<referenceContainer name="header.wrapper">
<block class="Magento\Theme\Block\Html\Header" name="header.links" after="logo">
<arguments>
<...
5
votes
4
answers
5k
views
Magento 2 - Backend custom module 404 error
I'm trying to create my custom module in the back-end, I followed a lot of tutorials, but I continue to get 404 error when I try to access to my controller. The only thing that work fine is the menu ...
0
votes
1
answer
1k
views
Magento 2 - CSP whitelist not work for subdomain
I have whitelisted all the resources that come from facebook inside the csp_whitelist.xml file and for my main domain: www.magento2.com works without problems.
But for my subdomains the csp_whitelist ...
3
votes
1
answer
2k
views
Magento2 : How to add <item> in XML <block> <arguments>
I would like to update the following layout .xml :
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<...
2
votes
2
answers
2k
views
Magento 2. Change column sort order
Columns in magento 2 has item sort order:
<item name="sortOrder" xsi:type="number">44</item>
But it doesn't change the column order. What need I to do to change columns order?
0
votes
2
answers
2k
views
How to change image background color in Magento 2 via XML?
I want to change the white background color to any other color in Magento 2.
How could I do it?
0
votes
1
answer
1k
views
Add Custom Attribute To Recently Viewed Products Widget
I have override widget_recently_viewed.xml in my theme in Magento_Catalog
with
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1
answer
18
views
How to change the magento2 layout to all options in the personal area?
is there a faster way to change the layout from 2columns-left to 3columns to all the personal area pages (account, wishlist, orders etc..) ?
i just got done creating this file:
app/design/frontend/...
1
vote
2
answers
4k
views
Xml Element reference is not allowed here
I am new to Magento & I am using Magento version 2.1.7 in my Windows 8.1 system with Xampp while creating a new module I am getting an error in my XML file located in the
app/code/vendor/module/...
0
votes
1
answer
623
views
Magento 2.3.2 Error XML declaration allowed only at the start of the document
I need for a programm to (webwinkelfacturen.nl) to read my taxrates so I can be pushed in an accountingsystem. But I am getting this error when I want to call domainname/ndex.php/rest/V1/taxRates
I ...
9
votes
1
answer
2k
views
Magento 2 - Move the afterMethods item (Discount and Gift Card Code) to the Order Summary sidebar
I would like to move the afterMethods xml item which contains the Discount Code and Gift Card code under the billing-step in the module-checkout/view/frontend/web/checkout_index_index.xml so that it ...
6
votes
2
answers
3k
views
Magento2: How to add separate css file on each cms page?
Is it possible to add individual CSS file on each cms page? Upon researching, I can do it by adding code on Layout update XML.
Unfortunately, it isn't working. Here's my code:
<head>
<...
0
votes
2
answers
3k
views
Magento 2: XML before="-" and before="_"
I'm sure this is a very basic question but as the description is so generic, I'm having trouble researching it.
I've noticed in the layout XML files.
before="_" (before with underscore)
before="-" (...
0
votes
3
answers
2k
views
Show/Hide Editor Not Responding
I have tried to look for previous solution and couldn't find any relevant topics. So I guess I should post a new question here. We are trying to toggle the WYSIWYG editor (Which is turned by default) ...
2
votes
2
answers
2k
views
Add block in layout XML only for one store view
I have a Magento 2.1.x installation with two store views.
I would like to show a particular block in the footer only for one store view.
In Magento 1.9.x I would have done it in this way:
<...
4
votes
2
answers
6k
views
Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login
After successful login, Luma theme shows customer account details in dropdown on header as seen in below image
I need to replicate the same in our custom theme which has Blank as its parent.
Vendor/...
4
votes
1
answer
2k
views
XML - Cannot move product.info.review after product.info.overview
I'm trying to do the following, moving product.info.review after product.info.overview (short description)
I've used the following code, but it is not working:
<move element="product.info.review"...
3
votes
2
answers
2k
views
Magento Container not working in custom layout
I have created a custom XML layout page that I will be using for my home page. Right now it is a clone of the normal 1column.xml layout, and I'm trying to add a container for an image slider.
Here is ...
6
votes
3
answers
2k
views
Facing issue when running the command php bin/magento setup:upgrade
Facing issue when running the command php bin/magento setup:upgrade
The XML in file "D:/wamp64/www/porto/vendor/magento/module-inventory-catalog/etc/communication.xml" is invalid:
Element 'topic', ...
4
votes
4
answers
2k
views
How to call module block after header?
I have a module layout file below
<default>
<block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" ...
36
votes
9
answers
40k
views
Admin config error: Undefined index: id in Iterator.php on line 59
Can someone please explain this error to me?
Exception #0 (Exception): Notice: Undefined index: id in /home/staging/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59
...
2
votes
2
answers
2k
views
Any change to default.xml breaks homepage layout
Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here:
app/design/frontend/Vendor/Theme/Magento_Theme/...
0
votes
1
answer
37
views
Magento 2 : Dynamic XML entity attribute value
I am setting up a module to run on Magento 2.4.6-p5 multi-website instances.
The module requires that a dropdown category attribute be setup with a default value and n other options (1 initially).
I ...
1
vote
1
answer
2k
views
Magento 2.2.2 - Move custom navigation into header-wrapper in XML and make it responsive
Below xml adds custom navigation before category. To make it responsive I have included it under block navigation.sections.
<referenceBlock name="navigation.sections">
<...
0
votes
1
answer
32
views
how to change position to sorter.phtml block?
i'm trying to move this UI element
vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/sorter.phtml from its original position to the right side of the screen inside another ...
0
votes
1
answer
1k
views
Product Page Layout
I'm trying to find a way to add a new custom layout for some products so I can just go to the Design Tab and choose the "Page Layout" from the dropout.
I can only find CMS Layout pages in google.
Also ...
0
votes
0
answers
16
views
How to change website's header frontend layout?
we were just given a new UI for our website and we need to make some radical changes to our theme; one of them being changing the header's container from one colum-horizontal to 3 columns-vertical.
We ...