If you want your own code using magento data base use follow step:
1. Here I am assuming your server come magento structure like this : C:wampwwwmagento
2. Then open file ‘C:wampwwwmagentoappdesignfrontenddefaultdefaulttemplatepage2columns-right.phtml’ copy below code and paste here after delet all exist code here
3.Copy and paste below in the page ’2columns-right.phtml’ :
{code type=codetype}
<table width=”100%” border=”2″ cellspacing=”0″ cellpadding=”0″>

<td width=”15%” valign=”top” bgcolor=”#999999″>
if (isset($_GET["categories"])) {

echo “categories=”.$_GET["categories"];
$sql = “SELECT * FROM catalog_category_entity_varchar WHERE entity_type_id=9 AND attribute_id =111 AND value != ‘Root Catalog’”;
echo ‘<br><br><a href=?categories=’.$row["entity_id"].’>’.$row["value"].’</a>’;
<td width=”85%” bordercolor=”#000000″ valign=”top”>
if (isset($_GET["categories"]))
$sql1 = “SELECT * FROM catalog_category_product WHERE category_id = ‘”.$_GET['categories'].”‘”;
$sql2 = “SELECT value FROM catalog_product_entity_varchar WHERE entity_id = ‘”.$row1['product_id'].”‘”;
echo “<br><br> name= “.$row2['value'];
$sql3 = “SELECT value FROM catalog_product_entity_decimal WHERE entity_id = ‘”.$row1['product_id'].”‘”;
echo ” , Price= “.$row3['value'];
$sql4 = “SELECT value FROM catalog_product_entity_media_gallery WHERE entity_id = ‘”.$row1['product_id'].”‘”;
echo “<img src=”.”media/catalog/product”.$row4["value"].”>”;
$sql5 = “SELECT sku,DATE_FORMAT(created_at,’%Y-%m-%d’) as created_at FROM catalog_product_entity WHERE entity_id = ‘$row1[product_id]‘”;
echo “<br>sku= “.$row5['sku'];
echo ” , created_at= “.$row5['created_at'];
$sql6 = “SELECT value FROM catalog_product_entity_text WHERE entity_id = ‘”.$row1['product_id'].”‘”;
echo ” , Longdesc= “.$row6['value'];
4. in url write like this


Share on Facebook