Questions tagged [xml]

Denotes questions about XML files and XML processing.

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

add a section/tab on the right section of all categories in front end magento2

Hi there I want to add my custom section/tab on the right section of all the categories for getting a clear idea I am attaching this image This is the men section I want to add the same custom tab ...
0
votes
0answers
17 views

Magento2 If I move containers with XML it kills css

I applied custom css to my navigation bar. Then when I moved the nav bar into the header via xml my css was no longer working. Why is that? The correct css is in the section.
1
vote
2answers
486 views

Set default value on select of page layout in cms_page_form.xml

I would like to set a default value for the select on the page layout when creating a new cms page in magento 2. The file I'd like to make an extension for is cms_page_form.xml under module-cms > view ...
0
votes
0answers
438 views

Magento2 set image size in etc/view.xml

I have this XML to set my image sizes for both related products and my catalog widget on my home page. The Related Products portion works but the home page one doesn't. <media> <images ...
0
votes
0answers
90 views

Move element is not working as expected in magento 2.1

In category_catelog_view.xml I need to move a custom layered navigation above the product grid. I tried all of the listed below <move element="custom.left.layered_nav" destination="content" before=...
0
votes
1answer
482 views

Element 'block', attribute 'remove': The attribute 'remove' is not allowed. Line: 745

I'm getting this error when I hit the front end. Couldn't able to find any solution regarding this. 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block'...
0
votes
1answer
120 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
0answers
90 views

Magento 2 on mobile display layered navigation before products

In default Magento theme, on the category page, the layered navigation is at the left column, and products in the main. This is OK. However on mobile, it first displays the products, and after the ...
10
votes
1answer
6k views

Magento 2 checkout index xml is not overriding

I am creating Magento 2 theme using the blank theme as the base. Now the problem is Magento 2 blank theme removing the top header, search bar, mini cart on http://www.yourdomain/checkout page vendor\...
1
vote
2answers
1k views

Can't override a core block using the referenceBlock method

I was wondering is someone has any idea of why my code is not working. I'm trying to override the sales order view to show an extra item on the "Items Ordered list". For this I created a module that ...
0
votes
0answers
31 views

Change Module position in xml

I used a module Product Videos in Magento 1. I like to show a videos in description tab ? It is possible ?
0
votes
1answer
2k views

Magento 2: XML before=“-” and before=“_”

I'm sure this is a very basic question but as the description is so generic, I'm having trouble researching it. I've noticed in the layout XML files. before="_" (before with underscore) before="-" (...
0
votes
0answers
48 views

In mftf, popup elements are not getting identified

In Test folder xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> <...
0
votes
1answer
88 views

error when creating a new container inside page.wrapper in magento2

I'm trying to create a container inside page.wrapper to contain some custom blocks for my checkout page. When I try the following in app/design/frontend/MyTheme/myname/Magento_Theme/layout/...
0
votes
0answers
53 views

XML product feed category problem

I have written a php script so I can produce for my Magento 1.9.3.8 an xml product feed to send my products to another price comparison site. I have a problem with the category path of my products ...
1
vote
1answer
236 views

Magento 2 How to disable admin menu based on configuration?

xcz I want to hide my custom module menu based on configuration. If in configuration it set to "yes" then the menu should display and if set to "no" then menu should not appear at admin. I have ...
1
vote
1answer
379 views

Magento 2 move reviews form inside list.phtml file

By default magento 2 review structure is like this - /templates/review.phtml and inside it you have - /product/view/list.phtml and Magento_Review/templates/form.phtml files. form.phtml file is ...
1
vote
1answer
2k views

Magento 2.2.2 - Remove default welcome message and show username post login

I need to remove default welcome message from header but display username after successful login. Tried below to hide welcome message but it also removes username after login <referenceBlock name="...
8
votes
6answers
11k views

How can i hide Discount Code form checkout payment page in Magento 2?

I tried to hide the Discount Code field from checkout payment page, but i can't find anything in xml files. For cart page, i found this field in checkout_cart_index.xml, and i was able to hide like ...
1
vote
1answer
1k views

Dynamic cron schedule based on storeconfig value

Is it possible to have my module cron schedule set in store config and can be updated by user? I mean this node: <schedule> <cron_expr>* * * * *</cron_expr> </schedule>
0
votes
0answers
30 views

Magento2 Functional Testing Framework (MFTF) - URL not redirecting properly

I want to redirect below page - <amOnPage url="admin/system_config/edit/section/adminconf/" stepKey="navigateToIncommCartTimeout"/> But it is redirecting only admin/system_config/edit/...
0
votes
2answers
601 views

Magento2.2.5 change create account link in top right header

I want to change the URL of the "create An account" link that is on the top right of the site. I want the link to instead of being customer/account/create/ I want it to be customer/account/login I ...
1
vote
2answers
1k views

How to remove block conditionally in magento 2 using xml layouts [duplicate]

The requirement is to remove some default blocks when my custom module is enabled. So how could I remove this blocks using the admin setting configuration values. I am not creating a block that should ...
4
votes
1answer
21k views

Category Custom Layout Update XML - Magento

I'm trying to use a different phtml file in an layout update for a category for the product_sublist. Here's the catalog xml: <reference name="content"> <block type="catalog/...
1
vote
0answers
100 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-...
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
293 views

Magento Observer problem

I followed every step from this website : http://alanstorm.com/magento_config and I'm stuck with the observer. I think smth is wrong with my Observer.php. I get this error : a:5:{i:0;s:157:"Cannot ...
0
votes
1answer
104 views

Magento 2 - what event should I observe to change/intercept the calculation of subtotals on Cart

I am using Magento 2. I made an observer that observes anytime a new item is added to the cart. The observer works properly, I also managed to create a single product discount with this observer, ...
0
votes
3answers
329 views

Magento 2 Add block before another block using XML

I want to move minicart block to top.links block. This did the trick for me: <move element="minicart" destination="top.links" /> Now, I added a custom block with custom .phtml file to the top....
2
votes
2answers
10k views

Magento 2: Add class to pre existing xml container

How do you add a class to a pre existing xml block? Example: <container name="alert.urls" as="alert_urls" label="Alert Urls" after="product.price.tier"/> <block class="Magento\...
0
votes
1answer
42 views

Sales order history : remove tab

In xml, how can I remove tab of order in sales/order/history? Can't find the referenceBlock I just need to remove this tab, not the link. To be precise, I'm using an API that will replace this table. ...
1
vote
1answer
16 views

Adding a nav item via XML puts it in the UL but not the correct css classes. How can I add css in my xml?

<block class="Magento\Framework\View\Element\Html\Link\Current" name="nav.sitehome"> <arguments> <argument name="label" xsi:type="string">Link Name</argument> <argument ...
2
votes
1answer
147 views

Module custom page 404 error

An extension I'm using creates two custom pages in website: app/design/frontend/mytheme/default/layout/scommerce_competition.xml <?xml version="1.0"?> <layout version="0.1.0"> <...
2
votes
0answers
94 views

Element 'argument': The type definition is abstract and The state object to be removed is not the first in the list

I'm throwing this error on my /success/ page and it seems like such a generic error. It looks like further down the trace it's pointing to stuff like GoogleTagManager and other third-party modules ...
0
votes
1answer
332 views

Magento 2 - Move Block Not Working

I've created a faqs.xml for a bespoke page template and this is my code: <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
1
vote
1answer
262 views

How to hide Vat number?

I want the VAT number filed on to present when i click the user to zero vat customer group.If click any other group i dont want to show the vat field. Anyone has any idea how to fix this. /private/...
2
votes
1answer
377 views

Set page title without using deprecated <action>

Every answer I can find for setting the page title (H1 tag not the tab title) uses this format: <action method="setPageTitle"> <argument translate="true" name="title" xsi:type="string"&...
1
vote
0answers
93 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 ...
0
votes
1answer
286 views

How add text in custom theme header magento 2

<referenceContainer name="header.wrapper"> <block class="Magento\Theme\Block\Html\Header" name="header.links" after="logo"> <arguments> <...
0
votes
2answers
123 views

Magento 2: Calling a cms block in default xml

I am trying to call a static block in the footer block but it does not work. I created a theme and then created a default xml: \app\design\frontend\MyTheme\Theme-frontend-default\Magento_Theme\...
0
votes
0answers
14 views

Magento 2.2.5 Conflict when deleting links from the customer account page

When deleting the following links, the block-wishlist-management block is deleted as well when checking the Wishlists on the customer account space. Why? : <referenceBlock name="customer-...
0
votes
1answer
3k views

Assigning a custom CSS-file to a store

This question has been "half-answered" already here: custom CSS-files for single storeviews However I can't make it work just yet, so I need some additional explaining, if you'd be so kind. This is ...
2
votes
3answers
2k views

How to add custom css in luma theme in magento 2.1.2

Hi As Below path i have added code , app\design\frontend\Magento\luma\Magento_Theme\layout\default_head_blocks.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
1answer
198 views

Magento 2 Add CMS/phtml block bottom before product_list_toolbar and after product_list (Between)

I am not able to add a cms block in category page. XML: <block class="Magento\Framework\View\Element\Template" name="catalog.filter.content.bottom" template="my_module::test.phtml"/> what I ...
1
vote
1answer
142 views

Customer Account page title is at the bottom, and margin-bottom is being set to 0 but i cant find where

I'm so close to having this site finished and then this happens. I logged into the customer account section to check all was good and then i was greeted with this... It should look like this... I ...
2
votes
1answer
104 views

Overwrite Category Display Mode from “Static Content Only” to “Products Only” via Layout XML

I want to overwrite the "Display Mode" backend setting of a certain category via layout xml file (e.g. catalog_category_view_id_XYZ.xml). Any idea how to update the layout handle? I want to do this ...
3
votes
4answers
6k views

How do I remove a block with local.xml?

I am trying to remove a block named catalog.leftnav. After reading this- https://stackoverflow.com/questions/16937018/magento-remove-block-using-update-xml I created a local.xml file and put this in ...
36
votes
6answers
41k views

Debugging layout XML loading

TL;DR: is there a way I can debug the loading of the layout? As I believe one module's layout is conflicting with another. Related to a previous question I made: How to make a module layout to be ...
0
votes
0answers
145 views

Shopping cart and checkout in 1 page

How do I put shopping cart and checkout in the same page? I don't want any extensions. I want to do it in XML, but I don't how to do it.
1
vote
1answer
1k views

Product page XML file

Taking this page as a reference: http://ultimo.infortis-themes.com/demo/eighth/phone5.html I would like to add a custom CMS block under 'Add to wishlist'/'Add to Compare'/'Share'. I can't find the ...