Currently browsing category

Magento How To

Magento: How to get product rating and review?

Here is the code to get ratings and reviews for any particular product. /** * Getting reviews collection object */ $productId = $product->getId(); $reviews = Mage::getModel(‘review/review’) ->getResourceCollection() ->addStoreFilter(Mage::app()->getStore()->getId()) ->addEntityFilter(‘product’, $productId) ->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED) ->setDateOrder() ->addRateVotes(); /** * Getting average of ratings/reviews */ $avg = 0; $ratings = array(); if (count($reviews) > 0) …

Magento: How to create extension package?

You have built a custom magento extension (magento module) and you want to package it and submit it to magento connect (magento extension directory). This article shows how to create Magento extension package. I have included images for every step which I followed while creating extension package for my module …

Magento: How to run Magento code in an external website?

Suppose you have a Magento shop installed. You also have another php installation in your server (may it be wordpress, joomla, drupal, or any other php code system). Looking for improvement for your Magento Store? Facebook Connector Extension Product related article extension Magento Offer popup on exit extension Unlimited Slideshow …

Magento: How to get top rated products?

Here, I will be showing you how to get the top/highest rated product. The basic idea for getting the top rated products is fetching all products, looping through them, getting ratings of each product and populating a ratings array. After that sort the array and then slice the array for …