I have try to remove rating box in frontend category listing but i have no idea. Someone can help ?
Remove Rating Box from Category Page in Magento
productratings
Related Solutions
You can get the vote collection related to a review via the following code snippet. This will return you the content of the table rating_option_vote
including the rating_id
if that is what you are looking for.
$votesCollection = Mage::getModel('rating/rating_option_vote')
->getResourceCollection()
->setReviewFilter($reviewId)
->setStoreFilter(Mage::app()->getStore()->getId())
->load();
It would be wiser to rewrite the Mage_Catalog_Helper_Data
, as it provides the data on what categories will be added to breadcrumbs.
Assuming you know how to rewrite that helper class, here's what you have to do:
- Rewrite the class
Mage_Catalog_Helper_Data
. - Override
getBreadcrumbPath
method. Copy the original method but modify these lines:
// add category path breadcrumb foreach ($pathIds as $categoryId) { if (isset($categories[$categoryId]) && $categories[$categoryId]->getName() && $categoryId != $YOUR_CATEGORY_ID // Notice the extra category check here... ) { $path['category'.$categoryId] = array( 'label' => $categories[$categoryId]->getName(), 'link' => $this->_isCategoryLink($categoryId) ? $categories[$categoryId]->getUrl() : '' ); } }
Replace $YOUR_CATEGORY_ID
variable or set a value for it.
EDIT:
In case you don't know how to do a class rewrite
- Open the file
Mage_Catalog_Helper_Data
. - Find the method
getBreadcrumbPath
. It starts with something likepublic function getBreadcrumbPath()
Replace the whole method with this code:
public function getBreadcrumbPath() { if (!$this->_categoryPath) { $path = array(); if ($category = $this->getCategory()) { $pathInStore = $category->getPathInStore(); $pathIds = array_reverse(explode(',', $pathInStore)); $categories = $category->getParentCategories(); !$category_ids_to_remove = array(YOUR_CATEGORY_ID_1, YOUR_CATEGORY_ID_2); // add category path breadcrumb foreach ($pathIds as $categoryId) { if (isset($categories[$categoryId]) && $categories[$categoryId]->getName() && !in_array($categoryId, $category_ids_to_remove) // Notice the extra category check here... ) { $path['category'.$categoryId] = array( 'label' => $categories[$categoryId]->getName(), 'link' => $this->_isCategoryLink($categoryId) ? $categories[$categoryId]->getUrl() : '' ); } } } if ($this->getProduct()) { $path['product'] = array('label'=>$this->getProduct()->getName()); } $this->_categoryPath = $path; } return $this->_categoryPath; }
Replace the text YOUR_CATEGORY_ID
to the actual category ID of the category you want to hide. It should work after that.
Please take note that rewrite core classes is extremely not recommended as core files are replaced whenever you update your magento.
Best Answer
Open file app\design\frontend\YOUR_PACKAGE\YOUR_THEME\template\catalog\product\list.phtml and remove strings that echo Reviews information, for example:
or