Created
February 16, 2015 19:25
-
-
Save devjosh12/c5d5bffa8e0ea1471c89 to your computer and use it in GitHub Desktop.
load products with ajax by catid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$catid=Mage::registry('category_id'); | |
$pageno = Mage::registry('page_no'); | |
$catagory_model = Mage::getModel('catalog/category')->load($catid); | |
$_productCollection = Mage::getResourceModel('catalog/product_collection'); | |
$_productCollection->addCategoryFilter($catagory_model); | |
$_productCollection->addAttributeToSelect('*'); | |
$_productCollection->addAttributeToSelect('name'); | |
$_productCollection->setPage($pageno, 3); | |
$_productCollection->load(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment