Questions tagged [xml]

Denotes questions about XML files and XML processing.

Filter by
Sorted by
Tagged with
0 votes
2 answers
25 views

How to double extend Magento_Checkout/js/view/summary/item/details in Magento 2

is it possible to extend a new checkout_index_index.xml on top of already existing one I created a projectA/app/design/frontend/MageBig/martfury/projecta/Magento_Checkout/layout/checkout_index_index....
0 votes
0 answers
32 views

Magento 2 - Add custom form to admin sales order create

I'm trying to add a form to the admin sales order create page. When I create a new order i cannot see my form but if i refresh the page the form is available. i added code to sales_order_create_index....
0 votes
1 answer
83 views

How to add data to custom validation rule?

I would like to understand how to add additional data to custom validation rule. I noticed in Magento 2 core files something like the following: validator.addRule( 'validate-...
0 votes
0 answers
29 views

How to reorder the mobile menu tablist in Magento 2.4.3 default.xml

I am looking for the simplest way to reorder the mobile menu tabs in my custom theme inheriting luma on Magento Open Source 2.4.3. Both tabs are showing fine but I can not use before 'store.links' or ...
  • 21
0 votes
2 answers
32 views

Magento 2: Add block to cms page with / in the url key trough xml

Magento 2: I'm trying to add a block to a cms page with a layout overwrite. The problem is the url key has a / at the end which can not be removed. So the url key is uber-uns/ If i remove the / as a ...
  • 1,276
0 votes
2 answers
38 views

Custom Header Link Layout Update

I have added the below code to app/design/frontend/Company/Theme/Magento_Theme/layout/default.xml but the link is not appearing in the header. Can someone please tell me what I am missing? <...
0 votes
2 answers
38 views

routes.xml complains about empty tag, which is obviously not empty

I have python background so its really hard for me to get my hands on magento2, since I've never touched php/xml/js etc. before. Currently I just want to add a button in admin backend, which leads to ...
  • 103
0 votes
1 answer
28 views

What is the file I have to debug to know how Magento load all file di.xml from all core module and custom module?

I understand that Magento will read all di.xml files and the output will be an array. I want to know where this code is so I can debug and dig deeper into it. Any help? Thanks.
  • 11
0 votes
1 answer
32 views

Remove column xml uicomponent if condition is true

I have 2 columns in xml with js component, but i want display each column if condition is true, so if precio_anterior is not empty and value is different to 0 show precio_anterior column if not, show ...
0 votes
2 answers
29 views

Custom Page Module with existing theme template?

Is there a way to use a template from a third-party theme, that is already installed, with a newly created custom page module?
1 vote
1 answer
51 views

PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in

magento.cron log return error: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /home/mall/domains/myweb.com/public_html/vendor/magento/framework/Config/Dom.php:449 Stack trace: #0 /...
  • 2,146
0 votes
1 answer
13 views

Point admin button url to different custom module

<item name="label" xsi:type="string" translate="true">Add New Row</item> <item name="class" xsi:type="string">primary<...
  • 47
0 votes
2 answers
41 views

Cannot insert custom block into 'product.price.final' in XML

Here is my catalog_product_view.xml: I want to insert one CustomBlock to this final price block, so i can use getChildHtml() to call in template final_price.phtml, but it does not work so far, why ? &...
0 votes
1 answer
419 views

Pagebuilder WYSIWYG/Textarea showing full master.html template after saving page

I have created a custom pagebuilder component with a WYSIWYG editor (also tried with Textarea), but after saving the page in admin, the WYSIWYG is showing the full html output from master.html I would ...
1 vote
1 answer
113 views

How to remove particular filters from a specific category?

I want to remove the color and price filter only for the specific category in Magento 2.4.3-p1. I created a separate XML file (catalog_category_view_id_{category_id}.xml) and apply the below code. &...
  • 2,180
0 votes
1 answer
53 views

Add a template content to detail tab

I want to add some content within the product detail tab. I created my template below <referenceContainer name="product.info.details"> <block class="Magento\Catalog\...
0 votes
0 answers
64 views

Override search_request.xml

Is it possible to remove fields from the search_request, namely the _search and also replace the fields in the partial search. Adding a search_request file to a custom module only appears to merge ...
1 vote
1 answer
293 views

List of All Magento 2 Configuration Files

Magento 2 uses XML-based configuration files A LOT. When studying Magento or preparing for an exam, it is useful to have a list of all config files used in Magento 2. How can such a list be generated? ...
  • 5,657
0 votes
0 answers
41 views

Export correct URL in product feed with XSL

I try to export product URL:s for my Magento 2.3 website using this line of code in an XSL template: <xsl:element name="link"><xsl:value-of select="product_url"/></...
0 votes
1 answer
142 views

xml to extract data in php

Her are my code. I can't able to get full data in array format. Only Url get this php code. Where am I wrong. $sitemap = 'videomap-1.xml'; $context = stream_context_create( array( "...
0 votes
2 answers
58 views

What is the product attribute for product ID?

Every product recieves a unique ID, shown on the left on the product page screenshot. I do not choose this nunmber, the number is assigned by the system. Now I am trying to create a pricefeed with XML ...
0 votes
0 answers
11 views

Load XML in Windows 10 and format using CSS

First let me start of by saying that I am not a programmer or code person. I used to design websites back in the dinosaur ages of the internet but don't have a clue about any of it these days. Here's ...
0 votes
0 answers
13 views

standard magento one page checkout, not in 1 column magento 1.9

I'm trying to leave the checkout in just 1 column, but whenever I use the xml, the side column of progress still appears. He is still using 2columns-right.phtml. Why can't I leave the default checkout ...
  • 197
0 votes
0 answers
67 views

Magento 2 - Split large dataset XML Files, create a MAIN/INDEX XML RSS feed: Product data for Google parsing compatibility

I am busy creating a custom XML implementation for Google data; following these specifications: Google XML RSS v2.0 specification Question How can I split a RSS feed into multiple XML files, and then ...
0 votes
0 answers
120 views

Magento 2: Convert SOAP XML Response into array

I am getting below XML as a response, how can I convert it to an array? I have tried almost all the think available in internet but always getting this error: Decoding failed: Syntax error <soap-...
  • 1,069
0 votes
0 answers
82 views

Magento 2 Youtube is not working for configurable product

Using Magento 2.4 version. On simple products, youtube works properly. but on configurable and their children's products youtube is not working. Does Anyone face this type of issue?
  • 1,185
0 votes
0 answers
101 views

How to use conditions_encoded in a phtml file

I have a field type xsi:type="conditions" in widget.xml, and I would like to be able to pick it up in phtml. I managed to do this in using $block->getData('conditions_encoded') but what ...
  • 27
1 vote
1 answer
196 views

how to override TTL value from theme or module?

<block class="Vendor\Demo\Block\Menu" name="navpro.topnav" template="Vendor_Demo::menu.phtml" ttl="3600" before="-" ifconfig="Demo/top/...
0 votes
3 answers
225 views

How to hide top Navigation link My Account when signed out but still show up when signed in?

I have been looking around on others solutions but I can't seem to find any fix with my issue. I want to hide My Account link when your signed out. But I want to show it when your signed in. I have ...
  • 3
0 votes
1 answer
522 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 ...
  • 417
0 votes
1 answer
17 views

Control manditory fields for customer create from adminside

how to add custom rule from js for firstname in magento2? <validation> <rule name="required-entry" xsi:type="boolean">true</rule&...
  • 66
0 votes
1 answer
74 views

Why I can't edit XMLs in my Custom Layout Update via CMS?

I had layout updates via XML configurations per CMS page via admin panel as you can see below. After updating my Magento 2.3 I got another option instead. How could I add my layout changes with an ...
0 votes
1 answer
224 views

How to avoid JS minification in an external file add via requirejs-config.js?

I have a custom module called Quicklink it has its own JS files and external JS files too, I've added an external JS from a third-party CDN, but when I enable the JS minification in a Magento 2 clean ...
0 votes
1 answer
949 views

How to Integrate Button component with Form component? [duplicate]

I try to add my custom button to the form, not to the header of the form, but after some fields inside the fieldset, I found some examples here https://devdocs.magento.com/guides/v2.4/ui_comp_guide/...
  • 11
0 votes
1 answer
512 views

How can I display the categories and subcategories in my admin form like in the product page?

I am trying to add the categories and subcategories in a small panel Exactly like the one in the product panel and I want to add it in here instead of this XML field like the "toOptionArray"...
  • 71
0 votes
1 answer
114 views

Magento DOM error XML

I got some errors when I setup:upgrade my file in Magento 2. this is the error : Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/cloudpanel/htdocs/swift/vendor/magento/...
0 votes
1 answer
213 views

In Magento 2.4.x, How to remove the breadcrumb link and add custom class?

In Magento 2.4.x, I want to add the breadcrumb without a link and need to add a custom class for that. How to add that? Here is my XML code. <referenceBlock name="breadcrumbs"> ...
  • 1,114
0 votes
3 answers
346 views

How to add block for Specific category's products in Magento 2 by layout/catalog_product_view_attribute_set_id_[id]?

I am trying to the make block visible only in Category 3. The block renders fine in catalog_product_view.xml. However when I change the file to catalog_product_view_attribute_set_id_3.xml, it doesn't ...
0 votes
2 answers
48 views

Magneto 2: referencecontainer and container

I want to know the difference between <container> and <referenceContainer> for layout file. Thank you in advance!
0 votes
1 answer
45 views

What's the difference between a XML preference with slash and without it?

Checking the Magento core I see two patterns a class with the slash in the beginning and a class without it. What would be the difference?
0 votes
1 answer
497 views

How do I pass in a viewModel to a core block that has been overridden?

I am rewritting the /vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml file. The file MyCompany_MyApp::product/default.phtml works fine, but I want to pass a ...
0 votes
2 answers
62 views

Check current language in XML

The website has multiple store views. By default, the form is shown in the footer. I need to place it under the header, but only for one store view. Is there any way to move it there via XML?
0 votes
1 answer
131 views

can I use ```<svg> <path></svg> </path>``` instead of logo picture in magento2?

I'm trying to find a way that I want to use <svg> <path>content</svg> </path> instead of logo picture
0 votes
1 answer
80 views

Adding an XML array in the user session

I'm getting some data from an API. I want to save those data in my user session so that the API isn't called each time the page is reached. First time: load API, save in session After, load session ...
0 votes
1 answer
783 views

Magento 2 Insert / Move page.main.title inside my custom block

I have create a custom xml for Category Page and I need to move the Category Title inside my Block. This is my custom.xml code: <?xml version="1.0"?> <page xmlns:xsi="http://...
  • 2,156
0 votes
2 answers
73 views

Magento 2.4.2 : Override third party layout file

I have third party module where I want override its layout file. Third party module file: /app/code/Magecomp/Savecartpro/view/frontend/layout/savecartpro_customer_viewcart.xml <?xml version="1....
0 votes
2 answers
1k 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"?> &...
  • 816
0 votes
1 answer
1k views

How to use SortOrder in magento 2 xml files?

I was studying the construction of the checkout_index_index file on the checkout page, and I realized that there is no way to move an element using the "move element". But it is possible to ...
  • 197
0 votes
2 answers
1k views

Magento 2: Page Builder Product Carousel custom options 2 column Layout

I am trying to set the Page Builder carousel to show less items on a 2 column layout compared to a 1 column layout. Already I have updated the following file app/design/frontend/{Vendor}/{theme}/etc/...
  • 1
2 votes
1 answer
402 views

How to add checkbox default value below attributtes in xml

Hello everyone I want to add "Use Default Value" checkbox , for each attribute in that I have added , PS : 'If you have ever seen "Use default value" checkbox in Magento admin, it ...

1
2 3 4 5
24