Questions tagged [xml]

Denotes questions about XML files and XML processing.

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

Override template phtml file in magento 2?

First I have created a module and place it in a file I want to override \app\code\Vendor\Module\view\adminhtml\templates\widget\grid\extended.phtml The original location is vendor\magento\...
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/...
0
votes
1answer
2k views

Override base/ui_component/customer_form.xml

I'm trying to override the following file and I need the changes to show in adminhtml. vendor/magento/module-customer/view/base/ui_component/customer_form.xml I have copied the file to the location ...
2
votes
1answer
62 views

module.xml active attribute

Sometimes in module.xml the attribute active="true" is used but I could not find out what difference it makes to use it or not. <module name="xxxx" schema_version="0.0.1" active="true"/>
3
votes
1answer
1k views

error on line 11 at column 16: xmlParseEntityRef: no name in Magento 2

I am getting following issues when XML file open in the browser:- This page contains the following errors: error on line 11 at column 16: xmlParseEntityRef: no name Below is a rendering ...
2
votes
2answers
185 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 ...
0
votes
1answer
69 views

Strange load error when

We currently have a strange error on our website. Some productpages are not loaded, the php error that is displayed is: How can we solve this? Warning: simplexml_load_string(): Entity: line 136: ...
0
votes
2answers
2k views

Add js in head in magento 1.9

All js script are loaded in footer in magento 1.9. I want them in head. Can Anyone let how to do this ?
2
votes
0answers
352 views

Get upload_dir for custom system configuration file upload || getFieldConfig for custom system configuration

Im trying to add a file_upload to my custom module system configuration. The backend part works flawlessly and im able to upload the files to the directory i want them to. But i cant read the file ...
1
vote
1answer
174 views

Custom header navigation link and sort order

I'm trying to add a custom CMS page link (home) to the navigation menu which was successful using the following code in layout/default.xml <referenceContainer name="catalog.topnav"> &...
0
votes
1answer
38 views

I need to add some blocks on New Product view Page for Quick view

i am trying to create a new product detail page for only quick view section, rest of functionality i have completed and my final URL of product is like https://example.com/product_quick_view/product/...
0
votes
1answer
384 views

404 when submit Forgot password form added in custom theme

I have added a forgot password form to all the pages, by adding the following line in the default.xml of my custom theme: <block class="Magento\Customer\Block\Account\Forgotpassword" name="...
1
vote
1answer
345 views

Adding a custom register page, changes the page title - Magento 2

I am adding a custom register pop-up to all pages by adding the following block in the default.xml file in my custom theme: <block class="Magento\Customer\Block\Form\Register" name="...
1
vote
1answer
2k views

Override price renderer on listing pages via XML

I am trying to override a price template, namely price_final.phtml. etc/di.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
381 views

How to move the field error element “.Mage-error” outside of the “.field” element? Magento 2.2

I am new to Magento, and am using Magento 2.2. How can we move the error message that is generated to the outside of it's field parent. Please note that I am looking for a way to do it through my ...
0
votes
1answer
125 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
2answers
1k views

Adding css to a module in Magento 2

I am trying to add custom CSS without creating a theme and these are my steps. Step 1 I create a mycss.css file body{ background-color:green; } and this is the path app/code/vendor/module/...
0
votes
1answer
229 views

Remove script via xml

I got the following script loaded in the head: <script src="https://selfservice.robinhq.com/external/robin/XXXX.js" async="async"></script> What is the correct way (syntax) to remove it ...
2
votes
3answers
7k 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->...
0
votes
2answers
144 views

Completely removing the <ul> element at the top that page

I am new to Magento, and am modifying Magento 2.2. There is a element at the top of the page which I cannot get it removed. This is what I have already done: I have tried to remove the content ...
1
vote
1answer
97 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\...
0
votes
1answer
332 views

add phtml file in every cms page

I just started working on magento 2 and i want to call a phtml file for every cms page. I have created a theme and under Magento_Cms i have copied cms_page_view.xml from vendor and placed it in there....
1
vote
1answer
426 views

Store data in a xml file in Magento 1.9

I have a module that has some input fields in admin. One of the input is an ID that will use the same value every time, so I don't want to display that input in admin anymore to avoid changing or ...
1
vote
1answer
57 views

Inserting block with referenceContainer reorders existing elements

I tried to insert an additional button on the wishlist page, but when I do that for some reason the order of all elements in a certain container gets reversed (that includes <script> elements!). ...
0
votes
0answers
600 views

Call to a member function count() on null when loading Gallery

Im using Amastys Gallery plugin to implement into a tab on the product page, however the above error has come up when I pasted the code into my custom template. I have called my tab in the local.xml ...
2
votes
1answer
678 views

How to add layered navigation in Magento 2 on Top After Menu

I tried to move layered navigation from left-side to top of the products.But Nothing displays When I changed the page layout from 2 column layout to 1 column layout then it shows only product list.
1
vote
2answers
3k views

Magento 2 : How can i read Xml file data

I have product file in XML format. I just need to read this file and import those data. I have already use simplexml_load_file(file path) but it will work only small size of file. Is there any other ...
3
votes
1answer
3k views

Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login

After successful login, Luma theme shows customer account details in dropdown on header as seen in below image I need to replicate the same in our custom theme which has Blank as its parent. Vendor/...
1
vote
1answer
170 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/...
2
votes
0answers
338 views

How can I change grand total when user Clicks on Custom Payment method?

I am using the one-page checkout module. I want to change the grand total when user/customer selects the payment method. If customer/user selects the online payment option then grand total should ...
0
votes
1answer
132 views

Multiple initStatements in local.xml

I have a question regarding the local.xml (config) file in app/etc/. How is it possible to add multiple initStatements? Currently it looks like this: <initStatements><![CDATA[SET NAMES utf8]...
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="...
0
votes
1answer
933 views

Magento 2 - Removing swatches.css from theme

Its a pretty simple and straightforward question, at the moment my theme seems to be pulling through the following: Vendor/default/en_GB/Magento_Swatches/css/swatches.css this isn't in my theme, ...
1
vote
0answers
150 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 | ...
0
votes
1answer
348 views

Upgrade to 2.2 XML error

I am having an issue upgrading to 2.2.2 from 2.1.9. The following occurs when I load the frontend: 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': ...
2
votes
1answer
381 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
1answer
341 views

Does the REST API still accept XML?

quick broad question. Does the REST API in Magento 2 still accept XML input? According to the introduction, it does. But further on in the documentation, there is no mention. I have been able to ...
0
votes
1answer
1k views

1.9 - Custom Search Result Template

If I add the following to a category layout update, it successfully replaces the catalog/product/list template: <reference name="product_list"> <action method="setTemplate"> &...
1
vote
0answers
152 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(...
0
votes
2answers
146 views

Unable to change layout of checkout_onepage_success?

I have a checkout_onepage_success.xml file in the view/frontend/layout directory of my module but changing the layout attribute of the <page> tag from layout="1column" to layout="2columns-right" ...
1
vote
1answer
412 views

Inserting custom template before price on category page with XML - Magento 2

I want to include a phtml file after the product title on a category page. See here: In app/design/vendor/theme/Magento_catalog/layout/catalog_category_view.xml I have: <?xml version="1.0"?> &...
2
votes
0answers
21 views

missing XML start tag in theme.xml

Normally a XML file always needs at least the following starting line: <?xml version="1.0"?> The theme.xml files in the official distribution lack this tag, see for example the luma theme's ...
0
votes
1answer
1k views

Magento 2.2.2 - Move custom navigation into header-wrapper in XML and make it responsive

Below xml adds custom navigation before category. To make it responsive I have included it under block navigation.sections. <referenceBlock name="navigation.sections"> <...
2
votes
1answer
195 views

Braintree and Kount (GENE version 2.2.3) installation on Magento ver. 1.14.0.1

I'm trying to configure ENS via a Braintree, Kount, Magento workflow, and are experiencing errors that i'm unable to diagnose. Here's what I'm doing: Order # 100096149 | Jan 8, 2018 3:51:07 PM (...
5
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="...
2
votes
1answer
142 views

Show different logo when logged in

How to show different logo when the user is logged in?
2
votes
2answers
106 views

Prevent page layout from inheriting default.xml?

I have a <link> tag in the <head> section of my default.xml file, and I'd like to prevent that particular tag from rendering on the checkout page. Is there anything I can add to ...
3
votes
2answers
2k views

Magento 2 - How to remove main navigation from XML

We want to remove Magento's default main navigation using xml file but don't want to use remove, because ifconfig not working with remove. We want to remove main navigation only when our custom ...
2
votes
2answers
325 views

Can't apply custom layout update to block?

I have a static block identifier named 'can_content_block_ideas' and within that block the following template file is being called {{block type='core/template' template='can/home/featured.phtml}} ...
1
vote
1answer
528 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 ...