• Magento 2

    Magento2 add a cms page link to menu

    Magento2 add a cms page link to menu . Magento2 add a cms page link to menu or add a link to the menu, Magento2 add a cms page link to the menu. Most of the times, need to add cms page links or static link to the menu.T So, today I am writing this blog for add a cms page link to the menu at magento2.In this case, i am using Magento plugins and use before method. We have used class Magento\Theme\Block\Html\Topmenu  as the menu is rendered from this class and use before plugin. and use before plugin on _getHtml() First, create a module. Second: create di.xml where we will define the…

  • Magento2 get cart and checkout link in block or phtml
    Magento 2

    Magento2 get cart and checkout link in block or phtml

    Magento2 get cart and checkout link in block or phtml In Magento2 get cart and checkout link in block or phtml then you need to call getUrl() method.It is every easy to get those url at Phtml or block class. Also, there is no need to write layout xml code for getting cart and checkout page url at magento 2. If want to get cart & checkout link at PHTML file then try below code: Checkout Url [crayon-5c17eff8d4283648732445/] Cart Url [crayon-5c17eff8d4288754005214/]   If you want to call at block class try with Checkout link: [crayon-5c17eff8d428b228237588/]   and Cart link: [crayon-5c17eff8d428d815453407/] I hope this will help lots. More Import Blogs: Magento2…