skip to Main Content

How to get Magento 2 secure base URL?

I'm using below code to get base url in magento 2. $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); echo $baseurl = $storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_WEB); Let me know how to get secure base url.

VIEW QUESTION

Magento 2 : Add custom script just after head tag

i want to add custom script just after the start of head tag. like. <head> <script>console.log("I'm loaded!");</script> i tried to add code in default_head_blocks.xml <referenceContainer name="head.additional"> <block class="CustomModuleBlockSuccess" template="Custom_Module::success/head.phtml"/> </referenceContainer> => output : <script>console.log("I'm loaded!");</script> </head> this code are using…

VIEW QUESTION

Cant access Admin controller route – Magento

I'm trying to fire a method on a controller but for some reason is giving me a 404, everything looks ok, but is not working. config.xml: <admin> <routers> <adminhtml> <args> <modules> <cloud_magni before="Mage_Adminhtml">Cloud_Magni_Adminhtml</cloud_magni> </modules> </args> </adminhtml> </routers> </admin> And here…

VIEW QUESTION
Back To Top
Search