Questions tagged [layout]
Denotes the xml files used to define the block hierarchy which eventually renders the template files.
2,654
questions
1
vote
1
answer
38
views
Magento 2 How to override configurable.phml file in custom module
I have tried below way to override configurable.phtml file
/app/code/Vendor/Extension/view/frontend/layout/catalog_product_view_type_configurable.xml
https://i.imgur.com/gpII3Ct.png
But it did not ...
0
votes
0
answers
14
views
Add Javascript to a Single Custom Admin Configuration Page in Magento 2.4 with XML
I am developing a custom module and need to load a javascript function on my "Custom" admin configuration page created with system.xml at url "admin/system_config/edit/section/<...
0
votes
0
answers
27
views
Magento 2 category shows all catalog products instead of its actual products after setting its layout to a custom layout
I have the following issue with a magento 2.4.3 category:
Using the default theme (having the category's Design/[No layout updates] option selected), it properly shows its products and their number:
...
0
votes
2
answers
47
views
Override the canonical URL in custom layout handler
I'm attempting to override the canonical URL for a custom handler. I tried adding the following code via XML, but instead of overriding the default canonical URL, I now have both the default and the ...
0
votes
0
answers
13
views
Magento2: Translate META TAGS (Meta description) in layout XML files
We have created a custom page that is shown on some specific situations.
We successfully modified the META tags inside section in various layout files.
The question is: How can we make this text ...
0
votes
0
answers
12
views
Third Party Module Layout Override - use custom module or within theme directory
When overriding a layout xml file from a third-party module, example being Amasty, is it best to include the new xml file within a custom module, within app/code, or within the theme directory, that ...
1
vote
5
answers
264
views
Magento 2.4.6 - No such entity with cartId - checkout_cart_index.xml
We face the issue that we sometimes get the error in the exception.log:
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId =
#0 /vendor/magento/module-quote/...
0
votes
2
answers
426
views
Add Custom Field for creating new order from admin in Magento 2.4
I want to add new field while we create new order from the Magento admin. So, any one has any reference for this ?
0
votes
1
answer
27
views
How to load external es6 script module in Magento
Is it possible to add a script tag with the attribute type set to module e.g. type="module" in magento?
I'm trying to load a es6 module through the head of the xml file but it is not ...
0
votes
1
answer
26
views
How to override a node in an xml file of a ui_component
I have this xml file in some third party module having this content
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
0
votes
2
answers
66
views
Rename export csv file
Is there a way to rename the default export.csv filename to another filename?
I'm using the magento 2 export in my listing.xml
0
votes
0
answers
21
views
Override layout file in vendor directory of theme
I have created a theme in vendor directory. I want to override layout xml files in my theme directory. I have theme-frontend-themename. I have a folder in this directory named Magento_Theme. I want to ...
0
votes
1
answer
85
views
Is there any way to get system configuration value as true false in layout file(which is exists inside ui_component) array item in magento2?
I just wantend to get system configuration value inside the layout file which is exists in ui_component folder, in below code I just wantend to get system configuration value as true/false in the ...
0
votes
1
answer
42
views
Is there any way to get system configuration value in layout file which is exists inside ui_component
I just wanted to get system configuration value inside layout file which is exists inside ui_component, is there any way ?
1
vote
2
answers
87
views
Insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in register.phtml
I want to insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in the customer registration form - called in the Magento_Customer::form/register.phtml ...
0
votes
1
answer
87
views
Different header/footer for guest users
I want to show different header and footer for the guest users and default one for the logged-in users.
What is the right way to do so ?
AND using the custom module to achieve this.
0
votes
1
answer
94
views
Ratio of images changed after update
After updating from Magento 2.3.5 to Magento 2.4.5-p1,
I noticed that the aspect ratio of 1 image of 1 specific productpage has been changed.
The rendered size, rendered aspect ratio, intrinsic size ...
0
votes
1
answer
24
views
Move multiple blocks in Magento 2 without xml
I need to move several elements of a layout without using layout.xml
I have followed the bellow code to create an observer and it correctly moves a single element. When I try adding the other elements ...
0
votes
3
answers
54
views
How to print custom attribute on Product listing page?
my catalog_category_view.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
0
votes
1
answer
28
views
View invoice in backend breaks page (layout will not load)
The version of my magento2 is 2.3.5-p1.
Here is the problem: We will open the invoice view in backend. So we go to: ->Sales->orders->select an order ->go to Invoices->view
Does someone ...
0
votes
2
answers
63
views
How to double extend Magento_Checkout/js/view/summary/item/details in Magento 2
is it possible to extend a new checkout_index_index.xml on top of already existing one
I created a
projectA/app/design/frontend/MageBig/martfury/projecta/Magento_Checkout/layout/checkout_index_index....
0
votes
0
answers
20
views
Magento 2.4 move cart page shipping rates on top of the page
Hi I need to remove the cart page shipping rates list under the "Estimate Shipping and Tax" and move that block on the top of cart page. Can you give me some support to do that. SO far I ...
0
votes
1
answer
352
views
Exception: Namespace prefix xsi for type on argument is not defined in Merge.php / Extra content at the end of the document
We are using justbetter/magento2-sentry for catching errors in our Magento 2.4.5-1 shop and have lots of reports of such errors:
Warning: simplexml_load_string(): namespace error : Namespace prefix ...
-1
votes
1
answer
28
views
getting blank page after creating custom layout
I have created custom layout as below
created 3-columns-double-footer.xml file inside Magento_Theme/page_layout folder
<?xml version="1.0"?>
<layout xmlns:xsi="http://www....
0
votes
1
answer
11
views
Page configuraion is not in its right place (page_layout/catalog_category_view.xml)?
This file (vendor/magento/module-page-builder/view/frontend/page_layout/catalog_category_view.xml) belongs to namespace xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...
0
votes
0
answers
19
views
Products are not displaying
I'm not sure what is going on. I can add a product on a fresh install and the product page is empty. Now if I do a search the product will display and you can place it in the cart. In the product page ...
0
votes
1
answer
325
views
Save custom frontend form data to database magento 2.4.5
I have created custom form on frontend and now on submit click I want to save filled data to database.
module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/...
0
votes
0
answers
50
views
How to reorder the mobile menu tablist in Magento 2.4.3 default.xml
I am looking for the simplest way to reorder the mobile menu tabs in my custom theme inheriting luma on Magento Open Source 2.4.3.
Both tabs are showing fine but I can not use before 'store.links' or ...
0
votes
1
answer
34
views
Block that doesn't explicitly declare template?
I recently followed a tutorial to add a custom fee to the checkout summary of my Magento store and after getting everything working, I realized that the block I created didn't need to have an ...
0
votes
1
answer
241
views
Move sign In or Create Account links to new container next to cart icon in header
Does anyone know how to achieve below design.
Create a new container next to cart icon in header
move top bar sign in and create account links to new container.
Please kindly refer the screenshot ...
0
votes
2
answers
72
views
Custom Header Link Layout Update
I have added the below code to app/design/frontend/Company/Theme/Magento_Theme/layout/default.xml but the link is not appearing in the header. Can someone please tell me what I am missing?
<...
1
vote
1
answer
76
views
After changing to developer mode, I am facing the error Element 'remove': This element is not expected
After changing to developer mode, I am facing the error
My site is working perfectly until I change it to developer mode
Product page & News event page showing error. All other pages are working ...
0
votes
0
answers
25
views
Magento 2 adding a block on top of add to cart and quantity for configurable products
I am trying to add a custom block on top of the quantity and add-to-cart on the product details page for all products by making changes to catalog_product_view.xml.
I am able to achieve this using ...
1
vote
0
answers
89
views
magento 2.4.4.p2 cms page save Custom layout update is invalid
I am trying to save the existing cms page getting Custom layout update is invalid after upgrading 2.3 to 2.4.4 p2 getting this error.
if I save a new page saving properly works fine
I have checked the ...
0
votes
0
answers
74
views
Magento 2.4 how add tabs ui_component in module custom adminhtml
Good morning, could someone help me render some tabs in adminhtml with a custom module? I already managed to create the tabs, but the content is not displayed correctly, it is added in the same space ...
2
votes
2
answers
698
views
Magento 2 ui/form/field template Error since Upgrade from 2.3.7 to 2.4.5-p1
since I updated from Magento 2.3.7 to 2.4.5-p1 I'm getting some errors with some xml layouts.
On one of my XML files where I had
<item name="template" xsi:type="string">ui/...
0
votes
1
answer
121
views
How to stop external JS from being load from specific layout in Magento?
Magento provides a way to include external js or css using following method.
<css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url"...
0
votes
0
answers
19
views
New Order Confirmation Template - move order_totals to bottom of page
I created a new email template for New Order Confirmation Template , which uses the
{{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}
...
0
votes
1
answer
225
views
Magento 2 - Move header links to side of mini cart
I am trying to move the top content of the header panel to by the minicart:
I have tried several methods such as:
<move element="header.links" destination="header-wrapper" ...
0
votes
1
answer
46
views
Validate if render referenceBlock in checkout layout
I have tried validate if render referenceBlock in checkout layout, but it does not work.
I added block Vendor\Module\Block\Index in layout after referenceBlock
Vendor/Module/view/frontend/layout/...
0
votes
2
answers
48
views
Unable to display product name in catalog_product_view.xml
I am new at Magento, I would like to render the product name to catalog_product_view.xml (product page) from a custom phtml but it didn't work. May I know where did I go wrong? Thanks!
app/code/...
0
votes
1
answer
69
views
Add css file to layout not working
I try to add a css file to a new layout for a cms page (magento 2):
src/app/design/frontend/NAME/default/Magento_Theme/page_layout/lpmdd-without-header.xml
<?xml version="1.0" ?>
<...
1
vote
0
answers
48
views
How to move addtocart button right sidebar in magento
How to move right side add to cart in product detail page button please answer
I want to change this into
0
votes
1
answer
50
views
Route to Existing Layout
I am working on a custom page module and want to make a custom route however I would like to use the catalog_category_view.xml layout, instead of the [module_name]_index_index.xml needed for my route ...
0
votes
3
answers
697
views
best practice for get a block by id in *.phtml template in 2022 year?
Can you help me figure out which best practices to use for get block template by id in phtml file?
thanks everyone
if you need some info please send comment
okay, try it:
i created a block in admin ...
0
votes
1
answer
65
views
Layout.xml move element with custom condition
I want move an element based on my helper custom return (True/False), i knew if config can link up with backend config, but is it possible to use a custom helper?
<move element="logo&...
1
vote
0
answers
153
views
How to display the category tree on the left sidebar on one particular CMS page?
Magento 2.4
I tried displaying the category tree on the left sidebar on one of my CMS pages. The url key / identifier is mypage.html. I already set the layout to be 2 columns with left sidebar.
Now I ...
1
vote
0
answers
75
views
override admin panel layout and phtml in magento2.4.5
I want to override adminhtml layout and phtml file of vendor directory to my custom theme so how can I do that, if anyone have idea then please share.
"Because sharing is caring"
Thanks in ...
2
votes
1
answer
184
views
Where can I find the nav-sections phtml file
I want to customize the nav-section component, like changing data, adding more links, and customizing its styling on hover, but I cannot find its phtml or markup file in the Magento theme.
To my ...
0
votes
1
answer
366
views
add clickable URL for the category Image
I want to add custom clickable URL for the category image. Anyone can teach me what I need to do? I have to create a new attributes for the URL field?