Magento Blogs Archive

Magento : How do I Call a Static Block Inside Phtml File

In this tutorials    How do I call a static block inside phtml magento: Magento 2 : We calling static block in phtml file in Magento 2 : Chnage in XML file :  <referenceContainer name="content"> <block class="Magento\Cms\Block\Block" name="block_identifier_name"> <arguments> <argument name="block_id" xsi:type="string">block_identifier_name</argument> </arguments> </block> </referenceContainer> Change in Phtml file : <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier_name')->toHtml();?> For cms content : {{block class="Magento\\Cms\\Block\\Block" …

10 Magento Interview Questions (1-10)

(1) What is Magento? Ans : Magento is an e-commerce platform created by Varien open source technology.          Magento offers companies ultimate E-commerce solutions and extensive support network. (2) Different version of Magento includes. Ans :  Magento Enterprise           Magento .go           Magento Community (3) Latest …

Magento Include Phtml File in Phtml

How to display and call one phtml file as a link in another phtml file. Magento 2: :: Below is the code to call a custom template block in another template file in Magento 2. If you call testdemo.phtml file, then write following code: <?php $this->getLayout() ->createBlock('Bhavesh\Testdemo\Block\Testdemo') ->setTemplate('Bhavesh_Testdemo::testdemo.phtml') ->toHtml(); ?> :: Call template block in CMS static Block or CMS …

Magento 2 Develope Custom HelloWorld Module

In this Tutorials : How to Develope Custom HelloWorld Extention Module. So, Lest’s Start step by step :Company Name : MageCheckout Module  Name :  HelloWorld Folder&File Name : registration.php Block :         Helloworld.php Controller :  Index/Index.php etc :           –  frontend/routes.xml – module.xml view :        -frontend/layout/helloworld_index_index.xml -frontend/templates/helloworld.phtml first you need to create registration.php, using …

How to Change Layout of Category List Page in Magento 2

:How to Change Layout of Category List Page in Magento 2 :: Magento 2 provides easily change your category layout. There are two way for category list page layout changes. (1)Change Layout By Backed : Open your magento 2 backed and click on PRODUCTS->Categorys, select any one category. Now, go to “Design” field as per given screenshot. …

How to Creating A Custom Theme In Magento 2

We will learn How to create new theme in Magento 2. So, Let’s Start step by step : Company Name : magecheckout Theme  Name :  demotheme Folder&File Name Into Design Folder: registration.php theme.xml media : set image. web : css/source/_theme.css In  registration.php we will define our theme name and enable our theme module. So, In this file, we register our theme module. <?php /** …

How to Change Layout of Homepage in Magento 2

:: How to Change Layout of Homepage in Magento 2 :: Home page is more important in every site. We can add different layout in homepage for our magento store. We can adding following type of layout. -1 coloum -2 columns with left bar -2 columns with right bar -3 columns -Empty Go to your back-end and …

How to Change URL as SEO Friendly in Magento 2?

::How to change URL as SEO friendly in Magento 2:: Magento has always been one of the most powerful platforms in terms of SEO. There is add some more features in magento 2 compared magento 1. There is one new Magento 2 SEO feature that you will like: Fields Auto-Generation: It helps to set templates for …

How To Change Theme in Magento 2?

:: How To Change Theme in Magento2 :: We can easily change theme using back-end as per our requirement in Magento 2. In this post we are learning about this. The default theme in Magento 2 is called Magento Blank. To activate it, follow these steps: -Login your back-end and go CONTENT->Design->Themes, You are looking all theme as …

How To Display Static Blocks in Homepage Magento 2

We can add easily display static block using back-end in our Magento 2 store without adding any codeing file. Magento 2 provides more feature like this. First we need to create static block. Create Static Block : –  Go to the Admin Panel of the Magento Store and navigate to the CONTENT tab from the left …