2015-02-23 3 views
0

https://www.ashsmith.io/2013/03/quick-tip-adding-custom-category-attributes-to-magento/ С помощью этой ссылки я настроил свой атрибут категории, он отображается в бэкэнд, но он не будет сохранен, так что я могу получить и показать значение в интерфейсе.Атрибут нестандартной категории Magento не сохраняется

вар дамп показывает это:

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

Есть ли кеш обновления перед сохранением значения атрибута? –

+0

Выполнено, что несколько раз, не повезло, к сожалению. – LookingForAnswers

+0

Имея ту же проблему здесь, в моем случае это работает локально, но не наш сервер тестирования –

ответ

1

Я исправил эту проблему путем опорожнения кэша, индексирования веба-сайта и снова добавив поле корыта ссылки я условие. Теперь у меня есть два поля с неправильным описанием, но, по крайней мере, у меня это работает.

+0

Я слышу отчаяние в вашем голосе –

Смежные вопросы