2015-02-23 139 views
0

https://www.ashsmith.io/2013/03/quick-tip-adding-custom-category-attributes-to-magento/ 使用此鏈接我已經設置了我的自定義類別屬性,它顯示在後端,但它不會保存,以便我可以檢索並顯示前端的值。Magento自定義類別屬性not saved

變種轉儲顯示這一點:

object(Mage_Catalog_Model_Category)[19] 
protected '_eventPrefix' => string 'catalog_category' (length=16) 
protected '_eventObject' => string 'category' (length=8) 
protected '_cacheTag' => string 'catalog_category' (length=16) 
protected '_useFlatResource' => boolean true 
private '_designAttributes' => 
array (size=6) 
    0 => string 'custom_design' (length=13) 
    1 => string 'custom_design_from' (length=18) 
    2 => string 'custom_design_to' (length=16) 
    3 => string 'page_layout' (length=11) 
    4 => string 'custom_layout_update' (length=20) 
    5 => string 'custom_apply_to_products' (length=24) 
protected '_treeModel' => null 
protected '_urlModel' => null 
protected '_defaultValues' => 
array (size=0) 
    empty 
protected '_storeValuesFlags' => 
array (size=0) 
    empty 
protected '_lockedAttributes' => 
array (size=0) 
    empty 
protected '_isDeleteable' => boolean true 
protected '_isReadonly' => boolean false 
protected '_resourceName' => string 'catalog/category_flat' (length=21) 
protected '_resource' => null 
protected '_resourceCollectionName' => string 'catalog/category_flat_collection' (length=32) 
protected '_dataSaveAllowed' => boolean true 
protected '_isObjectNew' => null 
protected '_data' => 
array (size=37) 
    'entity_id' => string '321' (length=3) 
    'parent_id' => string '2' (length=1) 
    'created_at' => string '2015-02-02 14:50:55' (length=19) 
    'updated_at' => string '2015-02-23 12:33:52' (length=19) 
    'path' => string '1/2/321' (length=7) 
    'position' => string '2' (length=1) 
    'level' => string '2' (length=1) 
    'children_count' => string '23' (length=2) 
    'store_id' => string '1' (length=1) 
    'all_children' => null 
    'available_sort_by' => null 
    'children' => null 
    'custom_apply_to_products' => string '0' (length=1) 
    'custom_design' => null 
    'custom_design_from' => null 
    'custom_design_to' => null 
    'custom_layout_update' => null 
    'custom_use_parent_settings' => string '0' (length=1) 
    'default_sort_by' => null 
    'description' => string '<div><img class="catimage" src="/skin/frontend/waterlee-boilerplate/default/images/columbarium-binnen.jpg" /> 

<div class="catdescription"> 

<div class="cattitle"><h1>Urnen</h1></div> 

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porta arcu vel dictum volutpat. Praesent molestie dolor at vehicula consectetur. Praesent dictum, ipsum ac porta dignissim, arcu purus mattis tellus, tempus semper ex ligula quis magna. per inceptos himenaeos.</div> 

</div> 

<p style="text-align: center;"><span>Uitv'... (length=771) 
    'display_mode' => string 'PAGE' (length=4) 
    'filter_price_range' => null 
    'image' => null 
    'include_in_menu' => string '1' (length=1) 
    'is_active' => string '1' (length=1) 
    'is_anchor' => string '0' (length=1) 
    'landing_page' => string '15' (length=2) 
    'meta_description' => string 'a' (length=1) 
    'meta_keywords' => null 
    'meta_title' => null 
    'name' => string 'Urnen' (length=5) 
    'page_layout' => null 
    'path_in_store' => null 
    'thumbnail' => null 
    'url_key' => string 'urnen' (length=5) 
    'url_path' => string 'urnen-17.html' (length=13) 
    'path_ids' => 
    array (size=3) 
     0 => string '1' (length=1) 
     1 => string '2' (length=1) 
     2 => string '321' (length=3) 
    protected '_hasDataChanges' => boolean true 
    protected '_origData' => 
array (size=36) 
    'entity_id' => string '321' (length=3) 
    'parent_id' => string '2' (length=1) 
    'created_at' => string '2015-02-02 14:50:55' (length=19) 
    'updated_at' => string '2015-02-23 12:33:52' (length=19) 
    'path' => string '1/2/321' (length=7) 
    'position' => string '2' (length=1) 
    'level' => string '2' (length=1) 
    'children_count' => string '23' (length=2) 
    'store_id' => string '1' (length=1) 
    'all_children' => null 
    'available_sort_by' => null 
    'children' => null 
    'custom_apply_to_products' => string '0' (length=1) 
    'custom_design' => null 
    'custom_design_from' => null 
    'custom_design_to' => null 
    'custom_layout_update' => null 
    'custom_use_parent_settings' => string '0' (length=1) 
    'default_sort_by' => null 
    'description' => string '<div><img class="catimage" src="/skin/frontend/waterlee-boilerplate/default/images/columbarium-binnen.jpg" /> 

<div class="catdescription"> 

<div class="cattitle"><h1>Urnen</h1></div> 

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porta arcu vel dictum volutpat. Praesent molestie dolor at vehicula consectetur. Praesent dictum, ipsum ac porta dignissim, arcu purus mattis tellus, tempus semper ex ligula quis magna. per inceptos himenaeos.</div> 

</div> 

<p style="text-align: center;"><span>Uitv'... (length=771) 
    'display_mode' => string 'PAGE' (length=4) 
    'filter_price_range' => null 
    'image' => null 
    'include_in_menu' => string '1' (length=1) 
    'is_active' => string '1' (length=1) 
    'is_anchor' => string '0' (length=1) 
    'landing_page' => string '15' (length=2) 
    'meta_description' => string 'a' (length=1) 
    'meta_keywords' => null 
    'meta_title' => null 
    'name' => string 'Urnen' (length=5) 
    'page_layout' => null 
    'path_in_store' => null 
    'thumbnail' => null 
    'url_key' => string 'urnen' (length=5) 
    'url_path' => string 'urnen-17.html' (length=13) 
    protected '_idFieldName' => string 'entity_id' (length=9) 
    protected '_isDeleted' => boolean false 
    protected '_oldFieldsMap' => 
array (size=0) 
    empty 
protected '_syncFieldsMap' => 
array (size=0) 
    empty 
+0

保存屬性值之前是否有刷新緩存? – 2015-02-23 12:49:06

+0

做了多次,沒有運氣悲傷夠了。 – LookingForAnswers 2015-02-23 14:40:38

+0

在這裏有同樣的問題,在我的情況下,它在本地工作,但不是我們的測試服務器 – 2015-02-23 15:37:48

回答

1

我已經清空緩存,重新索引網站,並再次將現場解決了這個問題低谷,我提供的鏈接。現在我確實有兩個領域的描述錯誤,但至少我已經掌握了它的工作。

+0

我可以聽到你的聲音絕望 – 2017-11-23 16:06:22