Questions tagged [xml]

Denotes questions about XML files and XML processing.

Filter by
Sorted by
Tagged with
3
votes
4answers
10k views

Add .phtml file on all pages magento 2

I want to add my custom.phtml file on the top of all pages. How can I do this using custom module ? Any suggestion would be appreciated. Thanks
3
votes
3answers
9k views

Magento 2 - How to move the product price block before addtocart button?

I am using custom theme and trying to move the "product.info.price" block before the addtocart button. I have tried, direct into addtocart.phtml file but not working. <?php echo $this->...
1
vote
2answers
7k views

Magento 2 - Rearrange the order of the Cart and Totals on the Order Summary Checkout Sidebar

I would like to move the Cart to be above the Totals in the Order Summary Checkout Sidebar. I have located both the Totals and Cart xml items in the checkout_index_index.xml in the Magento checkout ...
1
vote
0answers
2k views

Magento 2: Customising Checkout page – not working!

I am trying to remove input fields (Company and Telephone) from the Checkout page. I have followed what is explained on the M2 site here under 'Disable a component'. I have done the below but nothing ...
1
vote
2answers
7k views

Make merged js and css file asynchronous in magento

Hello actually is anyone know how to make the merged js and css file load asynchronous in magento i try add <param>defer</param> into <action method="addItem"><type>...
6
votes
1answer
4k views

Magento 2 - How to reset XML block arguments such as CSS

I'm wondering how to unset CSS that has been set through the XML, for example: <block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::...
5
votes
3answers
1k views

Magento 2 catalog filter issue in frontend

I have filter catalog product collection based customer logged in frontend, Using event observer catalog_block_product_list_collection, Filter working fine. But the issue is found in Layered ...
3
votes
3answers
8k views

How to remove tool bar in Magento 2

I would like to remove the tool bar from my theme since I don't have that many products. So far I have tried this in my /app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml <...
3
votes
2answers
15k views

Adding custom css-files to theme (page.xml) - custom css-files for single storeviews

Question #1: For some reason, I can't seem to get my custom CSS file to be implemented into the theme. I've basically done this with the page.xml: Before: <action method="addItem"><type>...
2
votes
3answers
2k views

How add div after image block in Magento 2?

I want to add custom div after image block of product view page. In that div I will add custom html like add any text, image etc. Anyone have idea how we add custom div by plugin or observer?
1
vote
3answers
1k views

Magento 2 - Add custom js in admin product edit

I want to add custom js in product edit page (Admin) Is it ok to add it in some xml or is there any other way to do it? If it is xml, which XML do I need to work on?
1
vote
1answer
4k views

How to use “button” in UI component form - Magento 2?

I've written a custom module which adds a new tab to admin category edit page, using UI component form ([Vendor] \ [Module]\view\adminhtml\ui_component\category_form.xml). Everything works fine from ...
1
vote
3answers
5k views

How do you add a custom attribute to the customer grid in the adminhtml?

Seriously why is this such an exercise in frustration? I've added my custom customer attribute using the EAV model, the PROPER way. I'm able to save this attribute when I save a customer. I've ...
1
vote
3answers
9k views

Magento custom module is showing in advanced tab but not showing in admin configuration menu tab?

I am just a newbie to the magento extensions. I want to create a new module named as storeinfo in magento version 1.7.0.2 . For that I have my folder structure for app/local is like this magento ...
1
vote
1answer
2k views

Magento 2 : Dropdown Option not Showing in Admin Form

I add dropdown field in admin form to showing status enable or disable like this : <field name="status"> <argument name="data" xsi:type="array"> <item name="...
0
votes
2answers
3k views

Move Mini Cart (Magento 2)

I want to change the position of the mini cart in my theme. i am able to change it using css but it disturbs the mobile view. So is there any way i can do it using xml
0
votes
1answer
9k views

How to Add Admin page new menu and a sub menu under existing menu

I tried to create a simple module and menu.The Menu is successfully created and show. My question is how to add the same menu as a sub menu of existing menus(Ex : System). here is my Approach to ...
0
votes
1answer
1k views

how do i call a function(controller) from xml in magento?

this is my code: etc/adminhtml.xml: <?xml version="1.0"?> <config> <menu> <attributegrouping translate="title"> <title>Attribute Grouping</...
0
votes
3answers
2k views

Magento 2 - remove sidebar from checkout

I'd like to remove the sidebar from the onepage checkout in magento 2 as defined in checkout_index_index <item name="sidebar" xsi:type="array"> <item name="sortOrder" xsi:type="string"&...
6
votes
1answer
2k views

Magento 2 Add text in checkout page via XML

I'm trying to add custom text in checkout page via XML. I have my custom checkout_index_index.xml file with this inside: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="...
6
votes
2answers
13k views

Removing Welcome message from magento 2 - just xml

I've started to work on Magento 2 and get my head around it, I'm really familiar with Magento 1 and removing the welcome message was no big deal. However all I've found the location of the welcome ...
4
votes
2answers
496 views

how Magento validate XSD schema?

As we all know that Magento 2 uses XSD schema files to validate the contents of all module configuration files. But at that point, I have one question in my mind. How does Magento validate XSD ...
4
votes
2answers
2k views

Remove “Add to Cart” via Layout Update XML Magento 2.1

I'm trying to figure out how to remove the add to cart from specific items only in Magento 2.1 via "Layout Update XML on the product backend. In magento 1.x it was simple <reference name="content"...
4
votes
1answer
901 views

How can we write an XSD file in Magento 2?

I'm looking for some documentation or tutorial for creating custom xsd in Magento 2 but failed to find any good resource. I already found URN Schema Validation article in Magento 2 official ...
4
votes
1answer
3k views

Layout update handle per storeview

I'd like to change the title of certain blocks per storeview in my local.xml, however, I've tried numerous things and it doesn't seem to pick up on my changes, not even when I 'unset' the data, and ...
3
votes
2answers
3k 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="...
3
votes
3answers
10k views

Admin layout file not loading in custom module

I'm trying to load in a block on one of my admin pages in a custom module, but it doesn't appear to be loading. At first I thought it was a handle issue, but I've found out that the handle is ...
3
votes
2answers
2k views

Js file is not removed from xml

I am using the cjm colorselectorplus module. In their xml they have this line: <action method="addJs"><script helper="colorselectorplus/data/canShowjQuery" /></action> and in ...
3
votes
1answer
5k views

Magento 2 theme header - Welcome message

I've been learning the ropes in theming in magento 2, I've started to get the hang of it with my own theme using Snowdog as my parent and styling in sass. My question is, I came to remove the welcome ...
2
votes
3answers
638 views

Magento2.3: How to upload profile picture and show it on My Account dashboard?

We have customized the My Account dashboard with our own design. Now we wanted to implement the profile picture option while the customer do the registration. After the registration, in My Account ...
2
votes
2answers
1k views

How to hide top links from customer groups

Is it possible to hide certain top links depending on the customer group? As we have anew feature which we have added a link to in the top link but it is only available to certain customers. We have ...
2
votes
4answers
2k views

not able to add custom block in cart page above coupon block

i am adding the block through xml on cart page. i searching a lot but could not find the find the solution where i am getting wrong. <checkout_cart_index> <reference name="checkout.cart"...
2
votes
2answers
3k views

How to add breadcrumbs in my account pages

I want to add Breadcrumbs in my account page & it should be displayed on every tab selection below the Navigation menu bar. But it is not showing anything on my page it is looking like this But ...
2
votes
1answer
32 views

how `$this` works in magento. and how to use it [closed]

<?xml version="1.0"?> <layout version="0.1.0"> <default> <block type="page/html" name="nav" template="nav.phtml" parent="root" /> </default> </layout&...
2
votes
2answers
228 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 ...
2
votes
3answers
4k views

System.log error simplexml_load_string (Extra content at the end of the document)

System.log error 2016-02-04T03:16:25+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 9: parser error : Extra content at the end of the document in /var/www/html/magento/app/code/core/...
1
vote
1answer
843 views

how to create a CRON job to update products inventory

I want to create a CRON job which updates my Magento products Inventory by matching sku and product name with the third party products inventory. third party is using Sql server and my Magento project ...
1
vote
1answer
2k 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 ...
1
vote
1answer
69 views

XML has extra content

for a plugin we generate an XML output which works on several systems without a problem. One system though adds extra content. In the related controller we do have the following lines: $this->...
1
vote
2answers
3k views

Add Captcha to subscribe.phml

Hi I tried to add captcha to subscribe.phtml Here is my xml file. <default> <reference name="newsletter"> <block type="captcha/captcha" name="captcha"> ...
1
vote
1answer
86 views

remove header part from some .phtml pages [closed]

visit these links : http://4.videomergerapp.com/ we removed the complete header part [except logo ] in the following page : http://4.videomergerapp.com/marketplace/ I want to hide complete header ...
1
vote
2answers
2k views

class not found but class is created

I am receiving the following error Fatal error: Class 'Ns_Module_Model_Mysql4_Setup' not found in /Users/tony09uk/Sites/magentoDevTest/app/code/core/Mage/Core/Model/Resource/Setup.php on line 234 I ...
1
vote
1answer
799 views

Magento 2 - Move block or container only for specific Device

Is it possible to move block or container in Magento 2 only for specific device? For example, I want to move minicart like that <move element="minicart" destination="header.panel" before="-"/>...
1
vote
2answers
1k views

XML block Layout

I am trying to show newsletter block in the footer, except for the Homepage where I want to show it only in content area. I used local.xml to move newsletter from left to footer: <reference name="...
1
vote
1answer
7k views

How to add items to admin menu?

Maybe its a simple question, but not for beginners :) . How can I add item to the admin menu? also with submenus in magento ? I created a module, which have the following structure the content of ...
1
vote
0answers
173 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="...
0
votes
1answer
141 views

Magento 2.3.4 custom layout update - insert different facebook OG on each page

I need to have a different Facebook OG:IMAGE for each CMS PAGE. I found on official documentation how to add a custom layout update on Magento 2.3.4 --> I've already created this file ...
0
votes
1answer
432 views

Magento2: how to add remove header links conditionally

how to add remove header links conditionally. I am trying to show my account link only when the customer is logged in. Otherwise it should be hidden. How to do the same using xml files.
0
votes
4answers
55 views

Loading a custom block into Magento

Magento is still very much a learning curve for myself but I'm trying to steer away from so much of my hard-coded, procedural PHP and start following the Magento MVC. I've set myself the task of ...
0
votes
1answer
4k views

Magento Custom Product Page Design and Custom Options

I'm working on a turning some static HTML into a Magento template / theme, but I'm having some problems figuring out the best way to do things in Magento. The product page design we have is quite ...