Shane
Shane

Reputation: 1603

Magento layered nav attributes not showing

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

Answers (6)

jruzafa
jruzafa

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

Anil Singh
Anil Singh

Reputation: 161

  1. Click on category->display setting-> Is anchor set to "Yes".
  2. Open attriboue and set layered navigation -> yes.
  3. If still not working, reindex from system->index management

Upvotes: 16

alphacentauri
alphacentauri

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

Shane
Shane

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

clockworkgeek
clockworkgeek

Reputation: 37700

When in doubt, clear the cache and rebuild the indexes.

Upvotes: 4

venimus
venimus

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

Related Questions