【magento2】magento 调用所有分类及其分类下产品程序

时间:2018-11-25  来源:magento  阅读:

一:检索所有的分类

 代码如下


New Arrivals




$category_collection = Mage::getModel("catalog/category")->getCollection()
->setStoreId(1)
->addAttributeToSelect("name")
->addAttributeToSelect("url_path")
->addAttributeToSelect("is_active");
foreach($category_collection as $key=>$category) {
if($category->getId()=="5" || $category->getId()=="8" || $category->getId()=="9"){
?>

getId();?> new-arrivals-menu-trigger" href="geturl();?>" data-outfits-container=".outfits-getId();?>">geturlkey() ?>getName(); ?>

相关阅读 猜你喜欢
本类排行 本类最新