Questions tagged [xml]

Denotes questions about XML files and XML processing.

Filter by
Sorted by
Tagged with
0
votes
1answer
93 views

How to use dev:xml:convert?

I'm exploring the Magento 2 CLI and I don't know how could I apply the command below in real life? bin/magento dev:xml:convert Can you show me some example? Thanks!
0
votes
2answers
705 views

Adding block into an existing template

I'm trying to add some content of my block into the sales/order/history part. I have this: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
3
votes
2answers
1k views

Create plugin LayoutProcessor::process vs override checkout_index_index.xml

To add a custom field, I can create a plugin and it will add input on the checkout. 1) Create plugin LayoutProcessor::process Exapmle : Namespace/Module/etc/frontend/di.xml <config xmlns:xsi="...
2
votes
0answers
489 views

Magento 2 How to add Magnifier to product list page?

I have enabled Magnifier to product detail page from theme etc/view.xml <var name="magnifier"> <var name="fullscreenzoom">20</var> <!-- Zoom for fullscreen (integer)--> ...
0
votes
0answers
46 views

Custom register form

I want to create a custom register form. But, the user can only create an account if he is in my XML File. For now, I get the information of the user from my XML. Then I want to use this ...
1
vote
1answer
87 views

Get source xml of error

Is there a way to resolve any xml-file that causes an error? I cannot find the source file that causes this error (happens on checkout): Magento\Framework\Config\Dom\ValidationException): Element '...
0
votes
0answers
586 views

Magento 2 - Admin UI Component drag and drop rows example XML

I have a table that displays and fetches data from the database working fine. I have been searching for examples of how to layout the XML file to add drag and drop to the rows but just can't work it ...
0
votes
1answer
227 views

Move block to a different reference block

I need to move a subscription block from MageMonkey module. Here is the magemonkey.xml file and block that I want to move: <checkout_onepage_review> <reference name="checkout.onepage....
0
votes
1answer
56 views

Magento OnePageCheckout | Adjust layout

I want to move the Ebizmarts_MageMonkey_Block_Checkout_Subscribe block to be under Mage_Checkout_Block_Agreements. What would be the best way to approach it? Here is a screen shot of current layout: ...
0
votes
2answers
406 views

Magento custom block not showing on frontend

I'm trying to create custom block to show some info on the page, but got some weird issue that this block not showing. Already broke my brain by trying to debug why. There are some code snippets: ...
0
votes
2answers
45 views

Finding Where Modules Are Coming From

I am using a third-party theme called Porto. It has a slider on the main screen, and I can't figure out which files are used in displaying it. Turning on backend template hints doesn't help located ...
8
votes
7answers
3k views

Magento2 How to move toolbar

Anyone have any idea about How to move toolbar before left and right sidebar in magento2 using XML? Currently it is showing in Right side-bar.
0
votes
1answer
709 views

Magento 2.2 Store Selector not showing on the front end?

I've literally put this in my theme's default.xml file: <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="Magento_Store::switch/stores.phtml"/> ...
0
votes
1answer
300 views

cannot add custom css in cms page layout - magento 2.1.2 [duplicate]

I can't add my custom css in cms->page->design->layout, my code <head> <css src="Magento_Theme::css/mycss.css" /> </head> <referenceContainer name="content"> <...
3
votes
2answers
333 views

Disabling a UI component field while add new product in Magento 2

I have a UI component defining field, I want to display this field while edit existing product, and hide this field when add new product. Namespace\Modulename\view\adminhtml\ui_component\...
0
votes
0answers
134 views

magento 1.7 XML_ERROR: <config/>

I updated a extension in a working magento 1.7.0.2 (running on localhost), after updating it stopped working, so I got back with git and restored the database. After going to the previous version and ...
0
votes
2answers
187 views

How do I move a block to the top of the sidebar?

I have created a block in the backend of Magento and using the below code added it to the category page- <page> <body> <referenceBlock name="page.main.title" remove="true"/> ...
0
votes
1answer
134 views

Why would my layered navigation not close anymore?

I have created a child theme based off of Luma. On my category page layered navigation instead of it saying Shopping Options at the top I would like to have an image there. In my child theme I created ...
3
votes
1answer
220 views

default.xml showing error “Cannot resolve symbol 'string'” in PHP Storm IDE

default.xml showing error "Cannot resolve symbol 'string'" in PHP Storm IDE, but it's not effecting anything. Is this ok? Or is there something wrong?
0
votes
1answer
435 views

Magento 2 | Add NOINDEX, FOLLOW to 404 CMS page using XML

How do I add NOINDEX, FOLLOW robots META tag to a custom 404 CMS page in Magento using XML, no matter what URL the page is served at? By following the answer on this page, I was able to figure out ...
2
votes
3answers
2k views

Magento 2 | Add NOINDEX, NOFOLLOW to CMS page using Layout Update XML

How do I add the following robots META tag to a CMS page in Magento 2 using the Layout Update XML field? <meta name="robots" content="noindex,nofollow"/> I have tried the suggestions in the ...
0
votes
1answer
247 views

Move upsell after product description using xml

I am trying to move the up-sell block below the the description tabs I have this so far app/design/frontend/THEME/main/Magento_Catalog/layout/catalog_product_view.xml <page layout="1column" xmlns:...
-1
votes
1answer
88 views

Magento 2.2.2 How to add external script in Design Layout update XML?

What is the equivalent to the bellow code for Magento 2.2.2 This work for magento 1.9.2.7 : <reference name="head"> <block type="core/text" name="pixel"> <action method="...
0
votes
1answer
238 views

update cdata dynamically [closed]

I am creating copy of xml file and try to change local.xml file database name dynamically but CData is not getting proper. my code is below, $xml = new DOMDocument('1.0', 'utf-8'); $xml->...
2
votes
1answer
721 views

How to override Magento directory module /etc XML file

I am trying to override the ZIP code validation xml file in Magento's Directory module. I'm doing this because I want to enforce a space in UK postcodes. The path of the file I'm attempting to ...
0
votes
1answer
72 views

Google Search Console and Html tags

I have 2 questions, I am new to Magento but not to programming in general. Where do i change html content like H1, H2 in home page, products page, etc. I noticed the difference between cms and ...
0
votes
1answer
35 views

Magento 2 - insert meta data to page layout

I need to add different meta data for different page layouts, i've tried to do it like this: <referenceBlock name="head.additional"> <block class="Magento\Framework\View\Element\...
0
votes
1answer
52 views

Magento 2 : ui_component and its values

I know most of been gone through the Magento 2's ui_component. I would like to know that If i add new field in existing ui_component of core code, Do i need to write my custom code to save my ...
1
vote
1answer
1k views

Magento 2 Error : what is this error?

Tried to install a store locator extension. When go to the front end producing this error. 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': This ...
0
votes
1answer
217 views

How to disable slider only in home page?

I have an slider in home page and this slider show 5 product in every line everything all right but, when a user's page is small the number of products decreases and the slide starts to move. How can ...
0
votes
1answer
732 views

Override template phtml file in magento 2?

First I have created a module and place it in a file I want to override \app\code\Vendor\Module\view\adminhtml\templates\widget\grid\extended.phtml The original location is vendor\magento\...
1
vote
2answers
926 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
1answer
2k views

Override base/ui_component/customer_form.xml

I'm trying to override the following file and I need the changes to show in adminhtml. vendor/magento/module-customer/view/base/ui_component/customer_form.xml I have copied the file to the location ...
2
votes
1answer
60 views

module.xml active attribute

Sometimes in module.xml the attribute active="true" is used but I could not find out what difference it makes to use it or not. <module name="xxxx" schema_version="0.0.1" active="true"/>
3
votes
1answer
1k views

error on line 11 at column 16: xmlParseEntityRef: no name in Magento 2

I am getting following issues when XML file open in the browser:- This page contains the following errors: error on line 11 at column 16: xmlParseEntityRef: no name Below is a rendering ...
2
votes
2answers
165 views

Magento 2: CSS include sequence

If we include CSS in layout XML as below, Magento includes it after style-l.css and style-m.css. <css src="Magento_Theme::css/home/custom.css" media="all" /> But if we include CSS as below ...
0
votes
1answer
65 views

Strange load error when

We currently have a strange error on our website. Some productpages are not loaded, the php error that is displayed is: How can we solve this? Warning: simplexml_load_string(): Entity: line 136: ...
0
votes
2answers
1k 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
0answers
307 views

Get upload_dir for custom system configuration file upload || getFieldConfig for custom system configuration

Im trying to add a file_upload to my custom module system configuration. The backend part works flawlessly and im able to upload the files to the directory i want them to. But i cant read the file ...
1
vote
1answer
164 views

Custom header navigation link and sort order

I'm trying to add a custom CMS page link (home) to the navigation menu which was successful using the following code in layout/default.xml <referenceContainer name="catalog.topnav"> &...
0
votes
1answer
35 views

I need to add some blocks on New Product view Page for Quick view

i am trying to create a new product detail page for only quick view section, rest of functionality i have completed and my final URL of product is like https://example.com/product_quick_view/product/...
0
votes
1answer
347 views

404 when submit Forgot password form added in custom theme

I have added a forgot password form to all the pages, by adding the following line in the default.xml of my custom theme: <block class="Magento\Customer\Block\Account\Forgotpassword" name="...
1
vote
1answer
335 views

Adding a custom register page, changes the page title - Magento 2

I am adding a custom register pop-up to all pages by adding the following block in the default.xml file in my custom theme: <block class="Magento\Customer\Block\Form\Register" name="...
1
vote
1answer
2k views

Override price renderer on listing pages via XML

I am trying to override a price template, namely price_final.phtml. etc/di.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
313 views

How to move the field error element “.Mage-error” outside of the “.field” element? Magento 2.2

I am new to Magento, and am using Magento 2.2. How can we move the error message that is generated to the outside of it's field parent. Please note that I am looking for a way to do it through my ...
0
votes
1answer
99 views

Add to Parent Group in Magento 2.2

How to assign any block to group detailed_info in magento using <referenceBlock> tag in magento 2.2? In Magento 1.x it was like: <action method="addToParentGroup"><group>...
0
votes
2answers
1k views

Adding css to a module in Magento 2

I am trying to add custom CSS without creating a theme and these are my steps. Step 1 I create a mycss.css file body{ background-color:green; } and this is the path app/code/vendor/module/...
0
votes
1answer
201 views

Remove script via xml

I got the following script loaded in the head: <script src="https://selfservice.robinhq.com/external/robin/XXXX.js" async="async"></script> What is the correct way (syntax) to remove it ...
2
votes
3answers
6k views

Magento 2 - How to move the product price block before addtocart button?

I am using custom theme and trying to move the "product.info.price" block before the addtocart button. I have tried, direct into addtocart.phtml file but not working. <?php echo $this->...
0
votes
2answers
139 views

Completely removing the <ul> element at the top that page

I am new to Magento, and am modifying Magento 2.2. There is a element at the top of the page which I cannot get it removed. This is what I have already done: I have tried to remove the content ...