(English) Magento module Easy Topsellers (FREE) and Flat Catalog
subscribe
Magento

(English) Magento module Easy Topsellers (FREE) and Flat Catalog

Din păcate acest articol este disponibil doar în English.

7 Comments

  1. Good Repair!!!Thank you! Homepage is ok,but how to repair Catalog page?

    • Hi, perhaps you mean Category page? Please be more specific, perhaps also supply a url so I can see the problem. Cheers, Michael.

  2. Hi,thank you for your reply. This function resides in app/code/community/Magazento/Easytopsell/Block/Home.php. In this directory,There have other documents:Category.php Based on your repair,I try to modify this document,it is work. protected function _beforeToHtml() { $storeId = Mage::app()->getStore()->getId(); $sellDate=$this->getModel()->getSellDate($this->getModel()->getCatDaysLimit()); $collection = Mage::getResourceModel(‘reports/product_sold_collection’) ->setStoreId($storeId) ->addStoreFilter($storeId) ->addUrlRewrite() ->addOrderedQty() ->setDateRange($sellDate[‘startdate’], $sellDate[‘todaydate’]) ; if ($collection->isEnabledFlat()) { $collection->getSelect() ->joinLeft( array(‘cpl’ => $collection->getResource()->getFlatTableName()), “e.entity_id = cpl.entity_id” ) ->where(“cpl.visibility IN (?)”, array( Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH ) ); } else { $collection->addAttributeToFilter(‘cpl.visibility’, array( ‘in’ => array( Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH ) ) ); } $collection->addAttributeToFilter(‘status’, Mage_Catalog_Model_Product_Status::STATUS_ENABLED) ->setOrder(‘ordered_qty’, ‘desc’) ->setPageSize($this->getModel()->getCatProductsLimit()) ->setCurPage(1) ->setOrder(‘ordered_qty’, ‘desc’); $c = Mage::registry(“current_category”); $catId = $c->getData(‘entity_id’); if ($catId>0) { $category = $this->getModel()->getCategory($catId); $collection->addCategoryFilter($category); } $this->setProductCollection($collection); return parent::_beforeToHtml(); } This function resides in app/code/community/Magazento/Easytopsell/Block/Category.php.

  3. http://www.magentocommerce.com/magento-connect/magento-mostviewed-mostpopular-products-free-7566.html Could you fix this extension on flat catalog? They are magazento’s expansion. Structure and code are very similar. Thank you !

  4. http://www.magentocommerce.com/magento-connect/bnm-best-selling-products-new-products-and-most-viewed-products.html this expansion is very good,Could you fix this extension on flat catalog too?

Leave a Reply

You must be logged in to post a comment.

Curs Valutar

28 March 2024
Curs oferit de Banca Națională a României
EUR
4.973 RON
USD
4.6085 RON
GBP
5.8167 RON