Questions tagged [xml]

Denotes questions about XML files and XML processing.

0
votes
0answers
123 views

magento 1.7 XML_ERROR: <config/>

I updated a extension in a working magento 1.7.0.2 (running on localhost), after updating it stopped working, so I got back with git and restored the database. After going to the previous version and ...
0
votes
2answers
142 views

How do I move a block to the top of the sidebar?

I have created a block in the backend of Magento and using the below code added it to the category page- <page> <body> <referenceBlock name="page.main.title" remove="true"/> ...
0
votes
1answer
122 views

Why would my layered navigation not close anymore?

I have created a child theme based off of Luma. On my category page layered navigation instead of it saying Shopping Options at the top I would like to have an image there. In my child theme I created ...
3
votes
1answer
190 views

default.xml showing error “Cannot resolve symbol 'string'” in PHP Storm IDE

default.xml showing error "Cannot resolve symbol 'string'" in PHP Storm IDE, but it's not effecting anything. Is this ok? Or is there something wrong?
0
votes
1answer
401 views

Magento 2 | Add NOINDEX, FOLLOW to 404 CMS page using XML

How do I add NOINDEX, FOLLOW robots META tag to a custom 404 CMS page in Magento using XML, no matter what URL the page is served at? By following the answer on this page, I was able to figure out ...
2
votes
3answers
2k views

Magento 2 | Add NOINDEX, NOFOLLOW to CMS page using Layout Update XML

How do I add the following robots META tag to a CMS page in Magento 2 using the Layout Update XML field? <meta name="robots" content="noindex,nofollow"/> I have tried the suggestions in the ...
0
votes
1answer
236 views

Move upsell after product description using xml

I am trying to move the up-sell block below the the description tabs I have this so far app/design/frontend/THEME/main/Magento_Catalog/layout/catalog_product_view.xml <page layout="1column" xmlns:...
-1
votes
1answer
77 views

Magento 2.2.2 How to add external script in Design Layout update XML?

What is the equivalent to the bellow code for Magento 2.2.2 This work for magento 1.9.2.7 : <reference name="head"> <block type="core/text" name="pixel"> <action method="...
0
votes
1answer
210 views

update cdata dynamically [closed]

I am creating copy of xml file and try to change local.xml file database name dynamically but CData is not getting proper. my code is below, $xml = new DOMDocument('1.0', 'utf-8'); $xml->...
2
votes
1answer
634 views

How to override Magento directory module /etc XML file

I am trying to override the ZIP code validation xml file in Magento's Directory module. I'm doing this because I want to enforce a space in UK postcodes. The path of the file I'm attempting to ...
0
votes
1answer
65 views

Google Search Console and Html tags

I have 2 questions, I am new to Magento but not to programming in general. Where do i change html content like H1, H2 in home page, products page, etc. I noticed the difference between cms and ...
0
votes
1answer
33 views

Magento 2 - insert meta data to page layout

I need to add different meta data for different page layouts, i've tried to do it like this: <referenceBlock name="head.additional"> <block class="Magento\Framework\View\Element\...
0
votes
1answer
51 views

Magento 2 : ui_component and its values

I know most of been gone through the Magento 2's ui_component. I would like to know that If i add new field in existing ui_component of core code, Do i need to write my custom code to save my ...
0
votes
1answer
1k 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 ...
0
votes
1answer
198 views

How to disable slider only in home page?

I have an slider in home page and this slider show 5 product in every line everything all right but, when a user's page is small the number of products decreases and the slide starts to move. How can ...
0
votes
1answer
685 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
801 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
59 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"/>
2
votes
1answer
936 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
156 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
61 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
1k 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
282 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
154 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
32 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
307 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
320 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
249 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
74 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
918 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
182 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
5k 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
137 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
91 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
264 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
345 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
52 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
470 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
589 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
3answers
2k 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
2k 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
146 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
318 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
113 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]...
0
votes
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
615 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
111 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
318 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': ...