2016-04-13 32 views
0

在Magento文檔中,在創建catalog category api時,有幾個示例,其中參數設置爲但沒有解釋實際是什麼!用於創建目錄問題的magento樣本

剛使用。

$result = $client->call($session, 'catalog_category.create', array(2, array(// <<-- what is this 2 ?? 
    'name' => 'Category name', 
    'is_active' => 1, 
    'position' => 1, 
    //<!-- position parameter is deprecated, category anyway will be positioned in the end of list 
    //and you can not set position directly, use catalog_category.move instead --> 
    'available_sort_by' => 'position', 
    'custom_design' => null, 
    'custom_apply_to_products' => null, 
    'custom_design_from' => null, 
    'custom_design_to' => null, 
    'custom_layout_update' => null, 
    'default_sort_by' => 'position', 
    'description' => 'Category description', 
    'display_mode' => null, 
    'is_anchor' => 0, 
    'landing_page' => null, 
    'meta_description' => 'Category meta description', 
    'meta_keywords' => 'Category meta keywords', 
    'meta_title' => 'Category meta title', 
    'page_layout' => 'two_columns_left', 
    'url_key' => 'url-key', 
    'include_in_menu' => 1, 
))); 

任何人都知道它是什麼?

回答

1

它是您正在創建的類別的parent_id值。在默認的Magento設置中,「默認類別」id是2,在「根目錄」下。