Hi I have in my header, several calls to Mage to get the catalog categoery model and get a collection of items. My problem is, this seems to make my page twice as slow, even with HTML Block caching turned on in the admin. What I thought I could, was by using: $cache = Mage::getSingleton(‘core/cache’); [...]
Archive: catalog category
Posts Tagged ‘catalog category’
I have the following: $products = Mage::getModel(‘catalog/product’) ->getCollection() ->addAttributeToSort(‘id’, ‘RAND()’) ->addAttributeToSelect(‘small_image’) ->addCategoryFilter(Mage::getModel(‘catalog/category’) ->load($catId)); But I need to order by id RAND(), how can I do this? (The code shows how I’ve tried with no luck) magento get products from category, order by rand() Possibly Related Posts: magento javascript skin path admin vs frontend in layout [...]
Process faster and more requests This extension will boost your websites incredibly with page caching technique. Now your websites can serve many more requests in the same time as before and the response time for each request is reduce as much as possible and you dont have to upgrade your server hardware any more. Currently, [...]
Hi, i’ve been triyng to change the default result page of magento, i want the products grouped by categories, it don’t include the subcategories but the products, the search criteria is the product name, so, i was triyng to use the defalt simple search of magento, untill now no result, maybe i have to override [...]
I have this code in my view.phtml file which displays a list of all the products categories: <?php $catIds = $_product->getCategoryIds(); foreach($catIds as $catId) { $category = Mage::getModel(‘catalog/category’)->load($catId); echo $category->getName(); } ?> Instead of displaying the category list in view.phtml I would like to display it in tabs.phtml. Tabs.phtml displays additional product information at the [...]
by EricO (Posted Fri, 16 Jul 2010 23:13:55 GMT)I found a way around the issue with saving on another forum post. In the Magento admin, under System > Cache Management, rebuilding the Flat Catalog Category and Flat Catalog Product fixed that. However, the issue with the links expiring too soon still happens sometimes – even [...]
by EricO (Posted Fri, 16 Jul 2010 21:41:53 GMT)I found a solution on another forum post. In the Magento admin, under System > Cache Management, rebuilding the Flat Catalog Category and Catalog Product fixed the problem. http://magento-forum.co.uk/viewtopic.php?f=3&t=349#p1263 Magento Forum Possibly Related Posts: RT @TweetSmarter: 7 Free Tools For Integrating #Twitter With Your WordPress Blog: http://t.co/rZEwfLPx [...]
I have seen in catalog/category/view.phtml the category image url is retrieved by $this->getCurrentCategory()->getImageUrl() somewhere the category is set as current category. I have wasted several hours in finding where & how it is done but unable to find out. can anyone tell how it is done ? What i need is to show all [...]
I have added an integer attribute to categories by setting up an install script that runs like this: $categoryEntityId = $installer->getEntityTypeId(‘catalog_category’);$installer->addAttribute($categoryEntityId, ’my_attribute’, array( ’type’ => ’int’, ’input’ => ’text’, ’label’ => ’My Attribute’, ’required’ => ’0′, ’user_defined’ => ’1′, )); The attribute shows up fine in the eav_attribute table. However, I can’t figure out how to put data in this attribute from PHP. The following does not add anything to the catalog_category_entity_int table as I would [...]
Hi folks. I have a Magento helper class I wrote that works wonderfully in 1.3. However, we’re working on a new install of 1.4 and filtering by category won’t work for some reason. function __construct() { Mage::app(); $this->model = Mage::getModel(‘catalog/product’); $this->collection = $this->model->getCollection(); $this->collection->addAttributeToFilter(‘status’, 1);//enabled $this->collection->addAttributeToSelect(‘*’); } function filterByCategoryID($catID) { $this->collection->addCategoryFilter(Mage::getModel(‘catalog/category’)->load($catID)); } I can’t figure [...]