Questions tagged [xml]

Denotes questions about XML files and XML processing.

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 ...
0
votes
1answer
21 views

I have an error pointing to this block class but i'm not sure what's wrong with it.. (magento 2.2.5)

A validation error occured in an XML layout file <block class="Magento\Cms\Block\Block" name="gbp_success_page-block"> <container name="gbp-fullwidth-hero-wrapper" as="heroWrapper" ...
2
votes
1answer
74 views

How to get to know the XML file and its path for that template Path Hint in Magento 2

As we can enable template path hints in settings along with blocks but there is no option to show from which xml file it is coming in the frontend. How should I know which xml file to write to move, ...
2
votes
1answer
2k views

how to change template of content block?

I am trying to change content blocks template, but I couldn't. My xml is: <reference name="content"> <action method="setTemplate"><template>page/template.phtml</template>&...
0
votes
1answer
118 views

" appearing as &quot; in Exported report in xml format

My Product names contains double quotes ( " ) in their name. Example product name : Test Product(s) -14 cm - (1.6 mm)-1"-Red Now when I am trying to export my report in xml format, the name is ...
0
votes
0answers
52 views

call breadcrumbs block twice in page.xml magento 1.9

I am trying to call breadcrumbs.phtml file twice through page.xml file. In page.xml breadcrumbs are added here <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">...
2
votes
1answer
2k views

Magento 2: Update the CSS class name of #maincontent

Is there a way for me to remove the class name 'page-main' from the 'maincontent' div and add a new class name?
1
vote
2answers
100 views

Adding a Block between Menu and Breadcrumbs

Going a bit nuts trying to get my head around this. Debug mode doesn't help me. I'm trying to add a block just before the </header> on only Product Pages. I've created a phtml file with my ...
0
votes
3answers
2k views

Strange Error - Please help understand this

I am trying to write a direct query in Magento and it is working fine in my local but in the test environment it is giving the following error: Fatal error: Uncaught exception 'Exception' with ...
0
votes
1answer
89 views

Magento 2 overwrite checkout.cart.item.renderers block

I tried to set a new template for checkout.cart.item.renderers block and i found some issue, beucause I didn't know that i have to overwrite separately each type of product. I will post my solution, ...
0
votes
1answer
311 views

sitemap.xml shows different base path when generate

I have generated the sitemap for my live instance. But after generating it it is showing staging url in xml sitemap. When I see my xml sitemap in the browser for live site, it shows the links with ...
0
votes
1answer
624 views

Move related products to “Details” tab on product page

I would like to move related products to "Details" tab below description on product page.
0
votes
2answers
4k views

Magento 2 - change default category product grid settings

Magento 2 has four products displayed per row in the category view (grid) by default. How can i change that so it shows 9 products per page (3x3) in grid view? Currently it shows 9 products, but 4x2 +...
1
vote
1answer
1k views

Magento 2 - Knockout js minicart

My current theme has a layout inside of the following: Theme/default/Magento_Theme/layout/default.xml Inside of this I have removed the header and rebuilt it like so: <referenceContainer name=...
2
votes
1answer
160 views

Disable default magento free shipping method at frontend ONLY

Store -> Settings -> Configuration -> Sales -> Shipping Methods -> Free Shipping How can I disable this default feature of Magento in frontend only?
2
votes
2answers
184 views

Rewrite block declaration explantation

I want to know some detail in config.xml about rewriting block for exemple, usually when we create a block we need to declare it in a xml like this: <global> <blocks> <...
0
votes
0answers
101 views

Copy block in XML file

I need to copy the block cart.summary in checkout_cart_index.xml. How can I do this ? I've copied the block and change the same but it not working. (I only have my original block)
0
votes
0answers
14 views

Magento 2 - Move Blocks based on Design Layout Type of Product

I want to have a few layout types for products and control this via either the category and apply to child products or via individual products. I want for example to change to a 2 column view ...
4
votes
2answers
1k 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"...
0
votes
1answer
387 views

Magento\Framework\Exception\LocalizedException: Invalid XML file 0.1.0 Payeezy Magento 2

Facing below error: >Magento\Framework\Exception\LocalizedException: Invalid XML in file 0.1.0 Payeezy_PayeezyCheckout_Model payeezycheckout_mysql4 Payeezy_PayeezyCheckout_Model_Mysql4 ...
5
votes
1answer
285 views

Magento2 : Use of echo language construct is discouraged

I have my RSS feed from controller returned /displayed on frontend using echo , how do I replace echo any alternate method availabale? MEQP1.Security.LanguageConstruct.DirectOutput public ...
1
vote
1answer
94 views

Remove order in customer dashboard

How to remove "recently order" in customer dashboard ? I tried this : <referenceBlock name="sale.reorder.sidebar" remove="true"/> but nothing happened
0
votes
2answers
386 views

Remove My Account top bar when user is not logged in

i want to remove magento top link My Account if user is not logged in ,i do not want to modify core files, i tried to get solution but could not find any working one . i tried below method in : "...
0
votes
2answers
995 views

Magento 2 Element 'file': This element is not expected

I am getting following error after upgrading magento 2.1 to 2.2.3 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'file': This element is not expected. Line: ...
0
votes
3answers
28 views

Magento 2 accidental theme move

I FTP'd into my server with filezilla. I accidentally moved one theme into another. I have since moved it back but now its pulling in the footer from its parent theme, luma. Default.xml and Default ...
0
votes
0answers
72 views

Loads of system error logs in Magento 1

For instance when i'm clearing cache i get some errors and they are pointing to a core module here: 2018-10-04T15:20:26+00:00 ERR (3): Warning: SimpleXMLElement::__construct(): Entity: line 1: parser ...
0
votes
0answers
53 views

How to generate xml sitemap with new request_path after URL re-write?

I have just updated request_path for the product from www.xyz.com/my_product to www.xyz.com/my_product_new through url rewrite. The request_path is inserted in the database correctly and working ...
0
votes
0answers
156 views

Magento 2: Warning: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document

I am using magento 2.0 I have learn magento2 tutorials(No frills magento2 layout) of alan storm. I have create two xml files. when i run controller file then give Following error Warning: ...
9
votes
4answers
5k views

Magento 2: How to use the Layout Handle customer_logged_in?

Does Magento 2 have such handle as customer_logged_in? If yes how can I use it? I tried to create ../view/frontend/layout/customer_logged_in.xml and added there <referenceBlock name="content" ...
0
votes
2answers
2k views

How to set a specific category page as homepage in Magento 2

I tried to set as a homepage a specific category page but only for a storeview, but I am not sure how to do this. I have 2 store views and for one of these, I want to set particular category page as ...
2
votes
1answer
27 views

How to apply “if” condition to XML generation file

I have a Magento 1.7 Community plataform, connected to an ERP (Bling). We have a file that take all those php information and send as an invoice to Bling. In our products, we have a field named "...
1
vote
1answer
34 views

Magento 2 | Blocks don't appear

I created a new page layout for my home page. I want it to display 3 blocks next to each other. It should look like this: I created the blocks in backend but with the below code they don't show up. ...
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]...
3
votes
1answer
28 views

magento 1.9 custom module fronted error 404

I have problem to acces the custom module frontend controller. I am following a basic tutorial to build a custom module. These are the files I've edited: /var/www/html/magento/app/etc/modules/...
3
votes
3answers
73 views

What is “product wrapper” XML name?

I'm trying to move products element and can't find it's name to reference via XML. The element has class "products wrapper grid products-grid" in rendered HTML. Using Magento 2.
1
vote
1answer
105 views

Magento Dataflow Advance Profile To Export Customer in Google Contact Format

I have difficulty to find any guide relating to this subject. Basically, I want to export all customer using magento dataflow profile export to csv, in a way so I can just import the csv to the google ...
2
votes
0answers
140 views

Syntax for overriding config.xml module configuration with config.php in magento2?

I have a module MyCompany_ExampleModule. Its etc/config.xml file: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/...
2
votes
1answer
144 views

Move breadcrumb before sort by feature of toolbar section in Magento2

How to move breadcrumb of category list page into toolbar section of category list page. I need to move the breadcrumb to toolbar or either left sidebar before the filters. Is it possible to do like ...
0
votes
1answer
353 views

Magento 2 Knockout XML->PHTML->JS->HTML

I want to display static block in html login popup during checkout, but there is a problem. This is the html template which is called from js, this js is called from phtml, and this phtml template ...
2
votes
0answers
51 views

How to trim text before saving in system.xml

In my custom module in system.xml in Admin I have field: <field id="user_key" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> <label&...
3
votes
1answer
191 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?
3
votes
2answers
118 views

Extending the `events.xml` file

I'm trying to disable the default UrlRewrite event observers in the magento-catalog-url-rewrite Module. I have extended the file under app/code/xyz/MagentoCatalogUrlRewrite/etc/events.xml, set the ...
1
vote
1answer
24 views

Is it possible to display an XML Block based on an IF?

I use the below code in a module within catalog_product_view.xml to display a new Tab on the Product Page. <body> <referenceBlock name="product.info.details"> <block class="...
9
votes
1answer
1k views

Magento 2.1: how to remove argument and/or argument item from block?

I need to remove "from - to" price in bundle product page. So the question is how to remove item from argument? Block is created in magento2/vendor/magento/module-bundle/view/base/layout/...
0
votes
1answer
43 views

Magento 2 - How to create a calculator

I've created a new module in magento 2 and I want to add some additional files so that I can create a calculator. I'm unsure where to create a file that calls the functions of my calculator class and ...
0
votes
2answers
372 views

Export all the products that are not assigned to any category

I am looking for a way to export all the products that are not assigned to any category. I know it can be done using XML, but I don't have enough knowledge in XML to create an Action so is there any ...
0
votes
0answers
14 views

Magento 2: Add custom JS based on product id via XML

I am trying to load a JS-file based on a product id in Magento 2.1.7. I used the following approach: <head> <catalog_product_view_id_1> <link src="css/one.js" /...
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"&...
4
votes
1answer
592 views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
3
votes
3answers
230 views

What are the possible Argument Namespaces for Logos

I am tweaking my theme using the xml approach. I have this xml code: <referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/my-...