Magento Product Thumbnail Image Switcher

Step:1 go to file media.phtml ‘app/design/frontend/default/default/template/catalog/product/view/media.phtml’ step:2Find the code below<a href=”#” onclick=”popWin(‘<?php echo $this->getGalleryUrl($_image) ?>’, ‘gallery’, ‘width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes’); return false;”>  </a>Replace it with<a href=”<?php echo $this->helper(‘catalog/image’)->init($this->getProduct(), ‘image’, $_image->getFile()); ?>” title=”<?php echo $_product->getName();?>” onclick=”$(‘image’).src = this.href; return false;”>   <!–nested img tag To item seat who canada pharmacy amoxicillin normally Green that, no ...

Read More

getting all top and sub categories in magento

place this code in you top.phtml (\app\design\frontend\base\default\template\catalog\navigation) <?php $_helper = Mage::helper(‘catalog/category’) ?><?php $_categories = $_helper->getStoreCategories() ?><?php $currentCategory = Mage::registry(‘current_category’) ?><div id=”navMainWrap”><?php if (count($_categories) > 0): ?><ul id=”navMain”><?php foreach($_categories as $_category): ?><li class=”navLevel1″ id=”navJewelry”><a class=”navLevel1Link” href=”<?php echo $_helper->getCategoryUrl($_category) ?>”><?php echo $_category->getName() ?></a><?php $_category = Mage::getModel(‘catalog/category’)->load($_category->getId()) ?><?php $_subcategories = $_category->getChildrenCategories() ?><?php if ...

Read More

display product in magento with sql in list.phtml file

Place this following code in your  phtml file where you want to display particular category products this will return array of products and you can use this array to display product of particular category. $sql = “SELECT product_id  FROM catalog_category_product WHERE category_id=57″;$data = Mage::getSingleton(‘core/resource’) ->getConnection(‘core_read’)->fetchAll($sql); Happy Coding…

Read More