The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [xml]

Denotes questions about XML files and XML processing.

Filter by
Sorted by
Tagged with
1
vote
2answers
360 views

Magento 2 : How to pre-fill the value of a textarea (XML)

Here is my text area (admin side) code : <field id="description" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Enter description here</...
2
votes
1answer
156 views

custom widget in custom page footer

looking for some help. I have created a custom page with url: http://localhost/magento2/hello_mvvm/hello/world and here is a code from, view/frontend/layout/hello_mvvm_hello_world.xml code: &...
1
vote
1answer
1k views

Move product info in details tab

I basically want to move the tabs in the product info area. But within the details tab I want all the content of product.info. So I have tried to move the info section which has all short description ...
0
votes
1answer
395 views

How canl I set condition in layout file?

I have layout file have block like this <referenceContainer name="sidebar.additional"> <block class="Partsoto\CategoryCustom\Block\Search" name="category.custom.replacement.search" before=...
1
vote
0answers
204 views

Magento 2: How to add custom attribute in an admin field?

I created a new field using the file system.xml, but I need to add a custom attribute, for example, data-mycustomattr="true". You can see an example on this image below, the console shows a custom ...
0
votes
2answers
48 views

CSS custom not added

I have this structure : |-app/design/frontend |-Magento |-Theme |-layout |--default.xml |--default_head_blocks.xml |-Magento_Theme |-templates |-web |...
0
votes
0answers
49 views

XML sitemap redirects to HTML sitemap after change

I have a strange issue where when you visit www.website.com/sitemap.xml or www.website.ca/sitemap.xml, it shows the sitemap as an html page. The following has been added to my .htaccess : #Sitemap: ...
1
vote
0answers
31 views

Toggle data in xml for ui_configuration

I want to be able to enable/disable the following ui_configuration fieldset via configuration conditions. Much like an ifconfig. I know I can provide a boolean item named 'disabled' in ordered to ...
0
votes
1answer
70 views

Magento Config XML Path

In my custom module I have added a tab to the admin configuration section to manage service providers for an external service. I have creted the following group in my system.xml of my module: <...
0
votes
1answer
101 views

Magento 2 overriding a vendor xml file

I want to override an xml file of an extension module into my custom module, how can I do it?
0
votes
1answer
103 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
859 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
2k 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
503 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
107 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
640 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
252 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
57 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
471 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
4k 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
797 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
349 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
366 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
143 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
238 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
143 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
250 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
460 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
280 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
93 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
252 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
798 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
79 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
36 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
53 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
235 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
788 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
1k 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
62 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
182 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
69 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
2k 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
338 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
171 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"> &...