2010-09-09 91 views
2

目前正與Magento的項目工作.. 在我所上的點stucked .. 是當管理員通過magento數據庫結構?

添加任何子目錄/類別 管理類 - > custome設計

這裏的給兩個可選像

活動從主動到 .. 任何人都可以,誰知道Magento的數據庫,告訴我在哪裏或在哪個表這兩值店

感謝您的任何建議或幫助!

回答

2

我已經列出了以下目錄類別的屬性。由於類別是EAV類型,因此您需要查看特定的子表以獲取您的值。在這種情況下,custom_design_fromcustom_design_to是日期時間值,而實體的名稱是catalog_category_entity,所以您要的表格是catalog_category_entity_datetime

接下來的問題,你會發現獲取正確的屬性ID。因爲他們是容易改變,這裏的SQL查詢,以便抓住他們運行:

select attribute_id, attribute_code from eav_attribute where entity_type_id = 3 and attribute_code in ('custom_design_from', 'custom_design_to'); 

我得到52和53,但YMWV。希望有所幫助!

謝謝, 喬

+----------------------+--------------+ 
| attribute_code  | backend_type | 
+----------------------+--------------+ 
| name     | varchar  | 
| is_active   | int   | 
| url_key    | varchar  | 
| description   | text   | 
| image    | varchar  | 
| meta_title   | varchar  | 
| meta_keywords  | text   | 
| meta_description  | text   | 
| display_mode   | varchar  | 
| landing_page   | int   | 
| is_anchor   | int   | 
| path     | static  | 
| position    | static  | 
| all_children   | text   | 
| path_in_store  | text   | 
| children    | text   | 
| url_path    | varchar  | 
| custom_design  | varchar  | 
| custom_design_apply | int   | 
| custom_design_from | datetime  | 
| custom_design_to  | datetime  | 
| page_layout   | varchar  | 
| custom_layout_update | text   | 
| level    | static  | 
| children_count  | static  | 
| available_sort_by | text   | 
| default_sort_by  | varchar  | 
| include_in_menu  | int   | 
+----------------------+--------------+ 
+0

@ joe ...謝謝!!!有用!! – PHP 2010-09-10 04:45:41

+0

這真的屬於一個單獨的問題(需要更多的空間來回答)。 – 2010-09-10 12:15:01

0
Active from is an attribute whose attribute_code is custom_design_from(attribute_id 57) and Active To is an attribute whose attribute_code(attribute_id 58) is custom_design_to. 
This both attributes value are stored in database table `catalog_category_entity_datetime`. 

檢查上面像ENTITY_ID的價值排表是你的類ID,attribute_id是57和值活躍是店表相同的活性,以價值value場存儲在value字段中,entity_id是您的類別ID,attribute_id是58.