Questions tagged [xml]

Denotes questions about XML files and XML processing.

296 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
46 views

How do I specify structure of all child elements of a node in XSD where the node names vary?

I am building Magento 1 XSDs (XML Schema Definitions). Magento very often uses node names as a unique identifier for a node in XML. For example: <config> <events> <...
2
votes
2answers
1k 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?
2
votes
0answers
316 views

Magento 2 - make head element translatable

I wish to translate the "Forgot Your Password" string which is created as a head and body element on the Forgotten password page. I found that this string is generated via xml in: Magento_Customer/...
2
votes
1answer
85 views

Inserting blocks into custom places

In Magento 1 I can edit local.xml like so: <default> <reference name="root"> <block type="core/template" name="above_main" template="page/html/banner.phtml" /> </...
1
vote
0answers
15 views

Layout does not have a schema properly defined

When we run command line magento dev:tests:run default Our command show a bug: Data set: /app/design/frontend/Vender/name theme/module name/layout/default.xml The XML file at /app/design/frontend/...
1
vote
0answers
25 views

template is not working magento 2 admin customer_index_edit

I am calling a js function form this file current.phtml like this <script type="text/javascript"> require([ 'jquery', 'jquery/ui'], function($){ $(document).ready(function($) { updateAjax()...
1
vote
0answers
25 views

Override Api xml Magento1

i made changes in app/code/core/Mage/Customer/etc/api2.xml now i want to override this xml in my local module how i do
1
vote
2answers
27 views

Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?

There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts). app/code/CompanyTheme/LayoutSwitcher/etc/...
1
vote
1answer
17 views

Add custom block under long description (product.info.description)

I'd like to add a custom block in description tab just after long description field. I Tried <referenceBlock name="product.info.description"> <block class="Magento\Catalog\Block\Product\...
1
vote
1answer
28 views

Remove class on div from empty.xml layout

I am running Magento 2.2. I have custom HTML I want to add to a CMS page. After navigating to the page where this HTML resides, the content is automatically displayed inside a div with class page-...
1
vote
1answer
179 views

How to create page in customer account section Magento 2

I want to create new page and link to => HISTORY how i can do this?? where I can add a new link?
1
vote
1answer
37 views

When I switch the mode default to developer of magento2.2.3 then got this error Element 'count': This element is not expected

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'count': This element is not expected. Expected is ( argument ). Line: 1077
1
vote
0answers
40 views

How to add amazon and paypal buttons in the one page checkout module in magento 2?

We have to display Amazon button as a separate block in the checkout page, how can we achieve this?
1
vote
0answers
45 views

Magento 2 - display custom product details tab conditionally & as an URL

I want to create a custom product detail tab "Q&A" and only display the tab when there is an Q&A questions exist for the product, and the tab will be the hyperlink to the FAQ page ( for ...
1
vote
0answers
31 views

Magetno 2 get soap api as a xml format

Below is soaporderapi.php created root folder.It is working fine getting order responce but i need to show responce as xml format <?php error_reporting(E_ALL); ini_set('display_errors', 1); ...
1
vote
0answers
482 views

Exception #0 (Exception): Notice: Undefined index: id in \vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63

1 exception(s): Exception #0 (Exception): Notice: Undefined index: id in C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63 ...
1
vote
1answer
17 views

Editing bundle product page

i'm still new in magento 2 and i want to edit layout of bundle product page of magento 2, so i extend xml file of magento 2 from module-bundle. i create folder Magento_Bundle/layout/...
1
vote
0answers
23 views

Generate xml php code problem

I am using a php script to generate an xml from my magento 1.9 to a comparison engine. I have a field in the engine called mpn which need to be filled from my product's SKUs $aData['id']=$iProduct; $...
1
vote
0answers
77 views

What is the purpose of validation.xml file in Magento 2?

What is the purpose of validation.xml file in Magento 2? When and where do we use them ? I see there are couple of validation.xml files in Magento 2 directory. For example: vendor/magento/module-...
1
vote
0answers
77 views

Magento 2: understand processing order of layout handles and other directives?

I am preparing for certification on Magento 2 and I am having difficulty understanding this questions. Can anyone help me with these questions? Understand processing order of layout handles and other ...
1
vote
1answer
24 views

Is it possible to display an XML Block based on an IF?

I use the below code in a module within catalog_product_view.xml to display a new Tab on the Product Page. <body> <referenceBlock name="product.info.details"> <block class="...
1
vote
0answers
11 views

how to fetch value from URL and post in form M2

I have product grid in admin panel where I have edit link too. Edit link looks like http://localhost:8888/backend/division/products/productedit/a_id/10/id/26794/ in ui form I need to send this id :...
1
vote
0answers
141 views

Magento 2.2.5: How to create Button in Widget

i'm looking for the way to create Button in Widget I've done this but it throw an error said "Invalid xml type". So i thing that there's no such thing called xsi:type="button" in magento 2 widget. &...
1
vote
0answers
34 views

Magento 2: Alternative layout for bundle

I need two different layouts for bundles. For this I created an alternative page layout in the page_layout folder. I am able to access the page layout in the backend of the bundle what works like a ...
1
vote
0answers
140 views

Adding a widget into a tab - Magento 2

When you add a new widget you can specify a layout update container. I want to create a custom container that inserts the widget into a tab on the product page. If the tab is empty then hide it. I ...
1
vote
1answer
175 views

Moving grouped product table

I want to move the grouped.phtml table from next to the product image to underneath the image/short description within its own row. So it sits above the description/review tabs. How would it be best ...
1
vote
0answers
27 views

Remove/Unset content of CMS page

I have created a custom module which shows some custom product listing and banner data. I have created a system setting to set those things in homepage or use default one. Now what i want if admin ...
1
vote
0answers
49 views

ifconfig does not work in <css /> tags in Magento 2

ifconfig does not work in <css /> tags in Magento 2. 0 (Magento\Framework\Config\Dom\ValidationException): Element 'css', attribute 'ifconfig': <page xmlns:xsi="http://www.w3.org/2001/...
1
vote
0answers
200 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 ...
1
vote
0answers
24 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 ...
1
vote
2answers
922 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/...
1
vote
1answer
95 views

Magento 2.1.7 custom module UpgradeSchema not adding column

I'm not able to add new column to existing table UpgradeSchema.php: namespace Company\Module\Setup; use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\...
1
vote
1answer
157 views

M2 Can't add new Checkout Step

I'm following the Magento dev docs Add a new checkout step how to guide. But I get the following error in my browser console once I go to the checkout... GET http://example.test/checkout/...
1
vote
0answers
126 views

How content from layout_update table is set?

I have a row in the layout_update table that adds element to pages. I'd like to know how [some xml] from this row was set in the backed: id | handle | xml | sort_order | updated_at 194 | ...
1
vote
0answers
138 views

Recoverable Error: Object of class Credis_Client could not be converted to string

I'll add items to the cart and then they will disappear. I don't have too much more information at this point. line 374 is the last line here: if ($lock != 1) { $this->_log(...
1
vote
1answer
480 views

Magento 2: Change links html class in customer account navigation

I'm trying to change the html classes for my customer_account_navigation block. What I actually want to achieve is to display different icons for every single link. I tried the following in the ...
1
vote
0answers
128 views

Change select value toggle name

How can i change Yes to Active and No to Deactive? i've tried it with toOptionArray(): class ActiveDeactive implements \Magento\Framework\Option\ArrayInterface { public function toOptionArray() ...
1
vote
0answers
22 views

XML Error in storeviews Magento 1.9

Hello i try to create an xml feed, but it works only in some of my store views. I get the following error on line 419 at column 29: Input is not proper UTF-8, indicate encoding ! Bytes: 0x1F 0x63 ...
1
vote
0answers
105 views

Magento 2 override Magento_Checkout updatecart.phtml and include js file

I want to override updatecart.phtml and put some custom javascript in this file. When i put it in my theme file it goed wel, but how to include the javascript? I prefer it to do it in my own module ...
1
vote
1answer
80 views

Edit New Products Title Magento 2

In my home i added a widget for new products but i want to rename new products to something else`
1
vote
1answer
262 views

Divide footer into two sections Magento 2

I want to divide my footer into two sections using xml.
1
vote
0answers
20 views

Theme execution flow

I would like to know theme execution flow of Magento 2. I select a theme name 'A' and try to visit a page. Then I change the theme to 'B' and try to visit that same page. Which execution flow the ...
1
vote
3answers
5k views

magento 2 add static block on category page left sidebar only

I have override Module-Catalog into my theme's folder. I want to add custom blocks in category sidebar. so in catalog_category_View.xml file i have added following code which works if i put it in ...
1
vote
2answers
402 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: <...
1
vote
0answers
157 views

Add wishlist to my dashboard (customer_account_index)

I want to add the wishlist in my dashboard in the customer account. Problem is I have to make a new block like this. <block class="Magento\Framework\View\Element\Template" name="...
1
vote
0answers
361 views

Magento 2.2 - custom attribute module fails

I've made a custom attribute module using this magento stackexchange Link to article. etc/frontend/events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
0answers
540 views

How to create custom XML file for new .phtml template page in Magento 2.1?

I can't find a clear guide as to how to link a custom XML file to a custom PHTML template file in Magento 2.1. I created a test.phtml in app/code/Custom/Module/view/frontend/templates/ and also ...
1
vote
0answers
430 views

header my account dropdown not showing magento2.1

I have been trying to add my account drop down menu in my magento website. I found that it is there in luma theme by default. But my base theme is magento/blank. My account links are displayed in a ...
1
vote
3answers
372 views

How to get XML values

I'm using an API to send a request to a webservice, and it returns me an XML, but I don't know how to read the XML values Here is my code: $url = 'http://urlexample'; $headers = array( ...
1
vote
0answers
170 views

Magento 2 : override configurable product

Can u tell me which XML file bind all files to create configurable product so, I can override that file in my custom module at front-end side. Exactly, I want to create configurable button and by ...