2015-09-22 25 views
1

我通過目錄菜單添加了新的類別。但它沒有在前端顯示類別。爲什麼magento 1.7.0.2不顯示新增類別?

1.類別屬於默認類別。

2.Is活動 - 是

這是我與新的類別進行設置。保存後,當我到前端時,它不顯示類別。如何使產品在此類別下添加出現在前端。

生成的類別ID是72顯示該問題。下面提供的是我在.phtml文件中使用的代碼,用於顯示類別ID(72)的產品。除了類別ID 72(它是新創建的),通過傳遞類別ID來休息所有其他類別的產品。

<?php 
    $categoryId = 72; 
    //here $categoryId is the id of the category 
    $category = Mage::getModel('catalog/category')->load($categoryId); 
    $collection = $category->getProductCollection(); 
    $collection->addCategoryFilter($category); //category filter 
    $collection->addAttributeToFilter('status',1); //only enabled product 
    $collection->addAttributeToSelect('*'); 
?> 

請幫我解決這個問題

回答

0

請確保有以下幾點

Is Active = yes 

Include in Navigation = yes 

It must be sub category of Default Category otherwise you would not able see it 

clear magento cache 

也請確保產品的那些鏈接到這一類必須啓用。

讓我知道如果你仍然面臨的任何問題

感謝

+0

是上述的點都已經完成。但仍然無法獲得結果。 –

+0

也通過傳遞ID 72該網站不起作用。休息所有其他的id工作正常。 –

+1

你是否在類別創建後重新編排? –