New answers tagged

0

Define frontend model to point to block logic Something like this https://magento.stackexchange.com/a/259294/70343 you can append html with following ways <field id="test" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Some Test</label> ...


0

For implement cache for block, you need define cache_lifetime. <block class="Block\Class" name="blockname" > <arguments> <argument name="cache_lifetime" xsi:type="number">864000</argument> </arguments> </block> See more details at http://www.sivaschenko.com/magento2-full-page-and-block-cache-types/ Also, ...


0

Simply you need to go in the XML File and set the attribute as Cacheable True. For Ex: <block class="Block\Class" name="blockname" cacheable="true" />


0

Using checkout and checkoutConfig global variable, I couldn't able to get the baseUrl. What I did was, I just added new global variable for baseUrl in my custom module overriding \Magento\Checkout\Model\ConfigProviderInterface getConfig(). It will look like, $config['getBaseUrl'] = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\...


Top 50 recent answers are included