問題描述
我正在嘗試使用 mySQL 和 php 腳本批量更新特價"和價格",我知道包含價格"的表和行,但不知道包含特價"的表和行.
Im trying to update the "Special_price" and "price" in bulk with mySQL an a php script, I know the table and row that contains the "price" but not the one that contains the "special_price".
我查看了數據庫本身,但仍然沒有運氣.有任何想法嗎?我需要表名和字段名.
I've looks though the database itself and still no luck. Any ideas? I need the table name and the field name.
推薦答案
我是 Magento Question Answers Guild 的成員,因此我建議您修復 API 錯誤,而不是使用普通的舊 SQL 來更新數據庫.正如其他地方提到的,直接更新數據庫可能會使 Magento 進入系統無法識別的狀態,這可能會導致奇怪的、令人惱火的錯誤.
My membership in the Magento Question Answers Guild requires me to suggest you work on fixing your API errors instead of using plain old SQL to update the database. As mentioned elsewhere, updating the database directly might put Magento into a state not recognized by the system, which can lead to strange, infuriating errors.
也就是說,特價值將與其他產品屬性值一起存儲在
That said, the special price value will be stored with the other product attribute values in the
catalog_product_entity_decimal
表.該表有一個attribute_id
列,該列與eav_attribute
表具有外鍵關系.在 eav_attribute
表中查找代碼為 special_price
的屬性.attribute_id
和產品的 entity_id
應該足以在 catalog_product_entity_decimal
中找到正確的行.
table. This table has an attribute_id
column, which has a foreign key relationship with the eav_attribute
table. Look in the eav_attribute
table for the attribute with the code special_price
. That attribute_id
and the product's entity_id
should be enough to find the correct row in catalog_product_entity_decimal
.
請記住,如果產品沒有設置 special_price
,則不會存在任何行.還要記住,如果產品在不同的范圍級別設置了 special_price
,則可能會有不止一行.
Keep in mind no row will exist if a product doesn't have a special_price
set. Also keep in mind if a product has a special_price
set at different scope levels that there may be more than one row.
這篇關于保存“特價"的表在哪里?在 Magento 中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!