2 votes

How to remove block and block arguments in other XML layout magento 2

You can try to use it by adding null type. <argument name="alias" xsi:type="null" /> <argument name="block" xsi:type="null" />
Harish kuril's user avatar
1 vote

Need a block to cache its result regardless if it called from the controller or the template

I understand that you have some concerns about variable definitions and their behaviour in your code. When you define a variable as "protected" within a class, it means that the variable can ...
Mohammad Bharmal's user avatar
1 vote
Accepted

How to add an element under each product name on category pages?

No, We can't insert any element below the product name on the product list page by the catalog_category_view.xml file only use the before and after of phtml file. Have you looked at the list.phtml ...
Sohel Khan's user avatar
1 vote

Magento 2 : How to create a non cacheable block

You need to use this property of block for that cacheable='false' In to your xml file added block like this : <block class="Vendor\Module\Block\Classname" name="blockname" ...
Dhiren Vasoya's user avatar
1 vote

Magento Custom Module Directory Help

To override an HTML file through RequireJS with the map configuration, you should have the following configuration: var config = { map: { '*': { 'Magento_Checkout/template/...
Tu Van's user avatar
  • 7,008
1 vote

Not able to access Customer Session via custom module in Magento 2

Category page will always be cached. Also, block directives in the CMS does not provide as many options as layout block. You cannot disable cache inside a CMS block. If you want to show dynamic ...
Lokesh Naik's user avatar
1 vote
Accepted

Not able to access Customer Session via custom module in Magento 2

It is not recommended to get customer session in places which can be cached. Since the page you are working with is a cms page, it would be cached and once it's cached the cache server (fastly or ...
Vivek Kumar's user avatar
  • 5,385

Only top scored, non community-wiki answers of a minimum length are eligible