Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

You can see recently viewed products widgets in Admin panel->Content->Widgets you can remove completely from here. To display recently viewed products in bottom of the page, create CMS static block and click on Insert widget option and select recently viewed products widget and save the block. After that go to Admin panel->Content->Widgets, ...


0

As a last resort you can do stuff like this in template html echo $this->getLayout()           ->createBlock('Chapagain\HelloWorld\Block\HelloWorld')           ->setTemplate('Chapagain_HelloWorld::helloworld.phtml')           ->toHtml(); And remove the other XML reference. Whilst I appreciate this isn't the best approach we all have deadlines.


0

Why did you call the parent method twice? Try the following way, maybe will fix: define([ 'underscore', 'uiRegistry', 'Magento_Ui/js/form/element/select', 'Magento_Ui/js/modal/modal' ], function (_, uiRegistry, select, modal) { 'use strict'; return select.extend({ initialize: function () { this._super(); ...


0

You can actually remove it using CSS rule display:none of display property in your custom CSS: ul.compare{ display:none; }


0

basically, you need to create a child theme, so if any update come then no effect on your theme. and also use git so you can track the whole summary.


0

If you have created a child theme, You can override the file by copying the file to below location app/design/frontend/YourVendor/Module/CompanyTheme_LayoutSwitcher/layout/layouts.xml and add a sixth layout or any customization you need


2

You should use name instead of element in your xml <referenceBlock name="register-link" remove="true"/>


0

Can you try with this script instead ? I should work for you. I have done 2 things : Added the domReady to wait for the DOM to be loaded Define $ to be jQuery This is it : require([ 'jquery', 'domReady!' ], function ($) { $("input[name='code']").bind('input', function(){ $(this).val(function(_, v){ return v.replace(/\s+/g, ...


1

If you want to have the header and footer, your layout need to update something else than empty (1column, 2columns-left, 2columns-right, 3columns). <?xml version="1.0"?> <!-- /** * Copyright © Joshua Flood. All rights reserved. * See COPYING.txt for license details. */ --> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...


0

I looked at the base catalog_category_view.xml file in vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml: <referenceContainer name="columns.top"> <container name="category.view.container" htmlTag="div" htmlClass="category-view" after="-"> <block class="Magento\Catalog\Block\Category\View" name="category....


1

In your Custom/Theme/Magento_Theme/layout/default.xml <move element="top.search" destination="header.panel" before="minicart" />


1

You can move header search bar using below xml element, app\design\frontend\YourVendor\YourCustomTheme\Magento_Theme\layout\default.xml <move element="top.search" destination="where you want to move" /> As per your current search my suggestion is that you can manage it via CSS


0

You may use other solution - input type of block (or place where block is used) by <action method="setLinkType">...</action> Advantages of this solution are the name of the block name. You can put in your layout configuration (app\code\Vendor\ModuleName\view\layout\catalog_product_view.xml): <block class="Vendor\ModuleName\Block\Frontend\...


2

Try this from phtml $full_action_name = $this->getRequest()->getFullActionName(); It will return catalog_product_view, most of the time full action name is equal to layout name.


0

Instead of messing around with the layout files, I just added custom CSS inside style tags with the html editor inside the magento 2 page design area. Then Added custom js with a script tag in the same editor that selected the divs that were already there and removed their css classes. The divs are still there which is not a problem in my case as it was only ...


0

Try to change template name like below: (change Vendor_Module according to your custom module) <referenceBlock name="product.info.details"> <block class="Magento\Catalog\Block\Product\View" name="product.subdescription" template="Vendor_Module::product/view/subdescription.phtml" group="detailed_info"/> </referenceBlock>


0

You can try like this: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="Vendor_Module::css/AdvancedSearch.css" media="all and (min-width: 1px)" /> </head&...


0

Just for Knowledge share: I used the following code to load related product collection and show results in a custom way (only "formato" field) <?php $relatedProducts = $_product->getRelatedProductCollection() ->addAttributeToSelect('formato'); ?> <?php if ((count($relatedProducts)) != 0): ?> <div ...


0

Change layout XML file name. Magento layout xml file name always in small letters. replace it oneStepCheckOut_oneStepCheckOut_billingAddress.xml with file name onestepcheckout_onestepcheckout_billingaddress.xml


1

I can think of 3 methods that would work (depending on your DOM structure): Using two layout blocks You can create two blocks each with a unique name and then hide/display the relevant one using CSS media queries. To add a unique class to each block you can wrap it in another container, something like this: <referenceContainer name="category.product....


0

Within <sequence> tad in etc/module.xml: you can place all the modules, which have the same layout definition, so that your module will be loaded after them. Better idea is to google the words: "magento2 defer js" and find either free or paid extension, which will move all your scripts to the bottom wherever they are.


1

You should try with reference block method. <referenceBlock name="product.review.related"> <arguments> <argument name="template" xsi:type="string">[Vendor]_[Module]::product/list/items.phtml</argument> </arguments> In above name="" write your block identifier name. and name="" in argument pass tempalte. Or you can set a ...


0

You should indicate the specific Module location of your template: <block class="Magento\Catalog\Block\Product\ProductList\Related" name="product.review.related" template="Vendor_Module::product/list/items.phtml" />


0

add to cart is more of a block so when you want to remove a block you must edit files related to that block like layout.xml file, .phtml file.


2

You need to overwrite following template and remove addtocart content. vendor/magento/module-catalog/view/frontend/templates/product/list.phtml Because addtocart content is hard coded. Like: <div class="actions-primary"<?= strpos($pos, $viewMode . '-primary') ? $position : '' ?>> <?php if ($_product->isSaleable()): ?> &...


0

This solution working in magento 2.3 Set mode to developer if it's not already. Override checkout_index_index.xml to your theme This guide will help, the part where he edit /app/design/frontend/Vendor/themeName/Magento_Checkout/layout/checkout_index_index.xml Here add this code for phone field Between Start: Important part <item name="telephone" xsi:...


1

For customization on the Update cart button.Please follow this link it is worked great: How to override the checkout_cart_configure.xml template file into custom module Thank you.


0

To remove header & footer : 1: Update design with empty layout 2: add particular static block on cms by following way add below live in page content: {{block type="cms/block" block_id="static-block-to-use-in-cms-page"}} Let me know if you still have an issue in it


1

The two ideas I have for solving this are as follows: Overriding with an empty item My first attempt would be to override the item with nothing effectively emptying it. <item name="msrp_price" xsi:type="array"></item> Full block override I don't like the idea of this one but as a last resort it will work, and that is to fully override the ...


1

Not sure what theme you are using and may need to find out what your block names are but this should do the trick <reference name="before_body_end"> <block type="cms/block" name="custom_footer"> <action method="setBlockId"> <block_id>your-static-block</block_id> </action> </block> <...


Top 50 recent answers are included