Monthly Archive: June 2016

Jun 26

HTTP GET and POST Request

The HTTP is communication protocol between client(Web browser) and server(Application on a computer that host a website is the server). The HTTP stand for hypertext transfer protocol. Two method used for communication between client and server that is GET and POST. GET Request communicate with server through url by sending name/value pairs query string.(for example …

Continue reading »

Jun 01

Wishlist in Magento

Wishlist by customer id in Magento $wishList = Mage::getSingleton(‘wishlist/wishlist’)->loadByCustomer($custid); OR $wishList = Mage::getSingleton(‘wishlist/wishlist’)->loadByCustomer($customer); $wishListItemCollection = $wishList->getItemCollection(); if (count($wishListItemCollection)) { $arrproduct = array(); foreach ($wishListItemCollection as $item) { $product = $item->getProduct(); $arrproduct  [‘product’][] =array($product->getName(),$product->getPrice(),$product->getQuantity(),Mage::getBaseUrl(‘media’) . ‘catalog/product/’ . Mage::getModel(‘catalog/product’)->load($product->getId())->getThumbnail()); } } print_r($arrproduct );

Jun 01

Product Details in Magento

Product details by product id in magento $prod = Mage::getModel(‘catalog/product’); $_product = $prod->load($productid); // Enter your Product Id in $product_id echo $_product->getName(); //get product’s short description echo $_product->getShortDescription(); //get Product’s Long Description echo $_product->getDescription(); //get Product’s Regular Price echo $_product->getPrice(); //get Product’s Special price echo $_product->getSpecialPrice(); //get Product’s Url echo $_product->getProductUrl(); //get Product’s image Url …

Continue reading »