Questions tagged [xml]

Denotes questions about XML files and XML processing.

313 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
405 views

Magento 2 : Debug Xml

I need to work with xml and something doesn't work same it's always. Is there a way to see errors in xml syntax, calls, or something. I don't see nothing in Magento's log, or even in apache's log. ...
2
votes
1answer
460 views

Magento 2 - Override an xml file defined in the etc folder in a theme?

I am attempting to override the email templates for the Aheadworks_Giftcard extension. It seems that the email templates are defined in a xml file in the etc directory called sample_email_templates....
2
votes
4answers
954 views

Can't remove layout blocks. (Magento 2)

Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme. When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the ...
2
votes
0answers
24 views

How to change the /contact router to something else?

By default Magento2 offers a contact form. This can be reached under http://domain.tld/mage2orwhatever/contact. But we want to have the router to be translated, in our case it'd be kontakt. How can ...
2
votes
0answers
261 views

Move a specific widget to another container via XML

I want to move a specific widget, lets name it demoWidget to the top container, when it is on a site. How can I achieve this? I've thought about this solution, but have no idea how to do it: give ...
2
votes
1answer
484 views

Magento 2: How to move recently viewed

Having problems working out how to move the recently viewed block. I want it to sit above the details/review tabs but can't work out how to move it in the xml?
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
321 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
1answer
44 views

How to disable button url in Magento 2?

I tried to put # places of the url, but the url still works and e.stopImmediatePropagation () with js also didn't help. Is there any way to do this through xml or otherwise? Thanks <item name="...
1
vote
0answers
27 views

Magento 2.3.2 LayoutXML Update remove canonical

Under Stores > Configuration > Catalog > Catalog, We have "Use Canonical Link Meta Tag For Categories" set to "Yes" There are a couple of category pages that we want to edit the Canonical Link for. I ...
1
vote
0answers
30 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
29 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
42 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
21 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
34 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
366 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
48 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
62 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
40 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
611 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
29 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
110 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
0answers
12 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
189 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
39 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
162 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
210 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
28 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
51 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
216 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
33 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
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/...
1
vote
1answer
101 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
171 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
155 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
160 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
539 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
143 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
117 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
82 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
305 views

Divide footer into two sections Magento 2

I want to divide my footer into two sections using xml.
1
vote
0answers
21 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
2answers
527 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
163 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
363 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-...