Reputation: 1603
I'm using drop-down attributes and setting them with 'Use in Layered Navigation' but there not appearing.
Any sugesstions why?!
Upvotes: 8
Views: 22378
Reputation: 4276
For update all categories with attribute is_anchor to 1:
<?php
require_once 'app/Mage.php';
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
ini_set('display_errors', 1);
ini_set('max_execution_time', 600);
$categories = Mage::getModel('catalog/category')->getCollection();
foreach ($categories as $cat){
$_cat = Mage::getModel('catalog/category')->load($cat->getId());
if ($_cat->getData('is_anchor') == 0){
$_cat->setData('is_anchor',1);
$_cat->save();
}
echo $_cat->getName().' '.$_cat->getData('is_anchor').'<br/>';
}
Upvotes: 0
Reputation: 161
category->display setting->
Is anchor
set to "Yes".layered navigation
-> yes
.system->index management
Upvotes: 16
Reputation: 662
Layered navigation must be enabled in attribute options and category "Is anchor" option must be set to "Yes". And it works just fine.
Upvotes: 1
Reputation: 1603
Think Ive sussed it out IsAnchor=Yes needs to be turned on directly for the category with products in...
Is there a bulk upload that can be used to import / create these attributes?
Upvotes: 2
Reputation: 6047
See if layered navigation is enabled and also there is at least 1 product that have this attribute, because magento hides all values that do not have products
Upvotes: 0