New answers tagged

0

app/code/VendoreName/ModuleName/Setup InstallData.php <?php namespace VendoreName\ModuleName\Setup; use Magento\Customer\Setup\CustomerSetupFactory; use Magento\Customer\Model\Customer; use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet; use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; use Magento\Framework\Setup\...


0

I figured it out. I had to move the whole block: <!-- Konfigurator --> <container name="configurator.foo" htmlTag="div" htmlId="configurator_foo" after="product.info.media"> <block class="Magento\Catalog\Block\Product\View" name="product.info" template="Magento_Catalog::product/view/form.phtml" after="alert.urls"> &...


0

once you created the customer custom attributes in order to allow to edit in checkout you need to add in billing or shipping address form using layout processor You can use the extension attributes for the same and then use that custom attributes value in local storage or in checkout session and set the data of that attributes whenever billing or shipping ...


1

the layout file will have name as format: {router_id}_{controller_name}_{action_name}.xml. You can understand the layout in detail in this Magento topic , and the instruction of a layout structure. When rendering page, Magento will check the layout file to find the handle for the page and then load Block and Template. We will create a layout handle file ...


0

Please add the following code in your block file Eg:CustomBlock.php <?php namespace [vendor_name]\[module_name]\Block; class CustomBlock extends \Magento\Framework\View\Element\Template { protected $_customerSession; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\...


1

Change the layout from mymodule_index_index.xml to myurl_index_index.xml.


0

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. More refer link :- https://magento.stackexchange.com/a/273974/36463 https://www.rakeshjesadiya.com/list-of-layout-xml-for-a-current-page-magento-2/


1

Change in following files: /vendor/magento/module-customer/view/frontend/templates/form/register.phtml (Append below code) <?php if (!$block->getAgreements()) { return; } /** @var \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Collection $argeementsCollection */ $argeementsCollection = $block-&...


0

First you have to Know about how layout file name should make. cms_index_index.xml Here cms is route name index is controller name index is controller action file name Replace your required route and controller file. Update app/code/VendoreName/ModuleName/Controller/Index Index.php <?php namespace VendoreName\ModuleName\...


0

Ok, I have found it is a CSS issue with display: flex and changed this to display: block and that seems to fix the problem.


1

You have to set 48 as value allowed in "Products per Page on Grid Allowed Values" ... in Store > Configuration > Catalog > Catalog > Store Front > Products per Page on Grid Allowed Values. Go to catalog > categories and select the category in which you have to set default grid value to 48. Go to tab Design > Layout Update XML and add this: You can paste ...


0

Remove the Invitation Link from Dashboard Sections. <!-- Invitations --> <referenceBlock name="customer-account-navigation-magento-invitation-link-container" remove="true"/> Remove Additional Sidebar from My account (Dashboard) <!-- Additional Sidebar --> <referenceContainer name="sidebar.additional" remove="true" />


1

If your theme is extending either Magento\blank or Magento\luma I think it's fairly safe to just include the updates as these don't seem to be updated much. If it's extending another 3rd party theme you'd probably be best making that judgement yourself. Of course if you want to keep the layout from being affected from as few changes as possible your theme ...


1

learn about system.xml click here link-1 and Link-2 I follow Magento Default way to send email. app\code\VendorName\RequestForQuote\etc\adminhtml system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> <system&...


0

You can use the table creating tool located right after the eraser tool. The bootsrap design will not be visible inside the editor since it does not load any external CSS nor script.


0

I solved it by executing grunt clean. Now after loading the source code site again, it shows https://example.com/pub/static/version1584630764/frontend/company/base/de_DE/Magento_Checkout/css/checkout/index/index.css" instead of https://example.com/pub/static/version1584630764/frontend/company/base/de_DE/css/checkout/index/index.css" and it works. Hint:...


0

To override module-theme::default.xml in your current theme : app/design/frontend/Smartwave/porto/Magento_Theme/layout/default.xml


0

Before removing cacheable="false", you have to look at the template files and refactor them to use knockout.js. There's a lot of tutorials out there. Also, if you look at the core-code, you can find usages in the minicart or welcome-message.


1

There are 2 ways in order to delete this link. disable the allow_company_registration in the config by putting company/general/allow_company_registration to 0 (not recommended if you want this feature to be still active) Magento_Company/layout/default.xml with the following <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights ...


0

create custom block file : app\code\Vendor\Extension\Block\Myblock.php <?php namespace Vendor\Extension\Block; use Magento\Framework\View\Element\Template; class Myblock extends Template { protected $productloader; public function __construct(\Magento\Catalog\Model\ProductFactory $productloader) { $this->productloader = $...


Top 50 recent answers are included