Create a custom page in Magento

<!---- First Create One Phtml File  -----> 
 ==> Go to app/design/forntend/default/base/tamplet/catalog/product ==> Here Copy any phtml file, ==> Paste that copied file, ==> Change the name with your Name ==> Example ::=> categoryid.phtml

 <!---- Second Create One Php File  ----->
 ==> Go to app/code/core/mage/catalog/block/product ==> Here Copy PHP file Which name is as your phtml file which you select and copy-paste, ==> Paste that PHP copied file, ==> Change the name with Same name of PHtml file and Must "First character be a Capital" ==> Example ::=> Categoryid.php

 
 <!---- Third Add this code in Product controller File  ----->
 ==> Go to app/code/core/mage/catalog/controller ==> Put belove code in this file 
  public function "Here your phtml file name in small letter"Action()  { 
   $this->loadLayout();
       
   $this->renderLayout();  }
 ==> Example ::=>
  public function categoryidAction()  { 
   $this->loadLayout();
       
   $this->renderLayout();  }
 
 <!---- Fourth Add this code in Catalog.xml File  ----->
 ==> Go to app/design/forntend/default/base/layout/catalog.xml ==> Put belove code in this file
  <catalog_product_Your Phtml file Name>
 
   <reference name="content">    <block name="Your Phtml file Name" template="catalog/product/Your Phtml file Name.phtml" type="catalog/product_Your Phtml file Name" as="Your Phtml file Name"/>
 
   </reference>  </catalog_product_Your Phtml file Name>
 ==> Example ::=>
  <catalog_product_categoryid>
 
   <reference name="content">    <block name="category" template="catalog/product/categoryid.phtml" type="catalog/product_categoryid" as="categoryid"/>
 
   </reference>  </catalog_product_categoryid>

And at Last Please Clean Cache from Admin


Feel free to write comment....

Comments

Popular posts from this blog

Adding Contact us link to Top Menu in Magento

Credit card number for Testing payment methods

Magento create invoice of specific order by programmatically