我尝试从管理员添加特价时出现Magento错误 [英] Magento error when I try to add special price from admin
问题描述
我得到的错误是: 指定了无效的后端模型:catalog/product_attribute_backend_startdate_specialprice
The error I get is: Invalid backend model specified: catalog/product_attribute_backend_startdate_specialprice
这是magento的本地副本,但我不想在实时站点上重新创建整个内容.关于如何解决此问题的任何想法?
This is a local copy of magento but I would not want to have to recreate the entire thing on the live site..any ideas on what I can do to fix this?
推荐答案
上述解决方案在我的情况下不起作用,因为我没有开发任何模块,因此在上述提到的文件中找不到名为"specialprice"的任何文件路径.
The above solution didn't work in my case as I didn't develop any module therefore couldn't find any file named "specialprice" in the above mentioned path.
我已经安装了一个模块,它将数据库中的"specialprice"后端路径更改为catalog/product_attribute_backend_startdate_specialprice
I have installed a module and it changed the "specialprice" backend path in the database to catalog/product_attribute_backend_startdate_specialprice
如果您遇到像我一样的问题,这是解决方案:
Here is the solution if you stuck in the same problem like me:
运行数据库查询以检查specialprice属性的值,即
Run the DB query to check the value of specialprice attribute i.e.
SELECT * FROM `<database-name>`.`eav_attribute`
WHERE (
`attribute_id` LIKE '%special_price%'
OR `entity_type_id` LIKE '%special_price%'
OR `attribute_code` LIKE '%special_special_price%'
OR `attribute_model` LIKE '%special_price%'
OR `backend_model` LIKE '%special_price%'
OR `backend_type` LIKE '%special_price%'
OR `backend_table` LIKE '%special_price%'
OR `frontend_model` LIKE '%special_price%'
OR `frontend_input` LIKE '%special_price%'
OR `frontend_label` LIKE '%special_price%'
OR `frontend_class` LIKE '%special_price%'
OR `source_model` LIKE '%special_price%'
OR `is_required` LIKE '%special_price%'
OR `is_user_defined` LIKE '%special_price%'
OR `default_value` LIKE '%special_price%'
OR `is_unique` LIKE '%special_price%'
OR `note` LIKE '%special_price%'
);
注意:将<database-name>
替换为您的magento数据库.
NOTE: Replace <database-name>
with your magento DB.
您将在数据库中找到三行.导航到名为"Backend_model"的列,然后您将看到其中一个写为
You will find three rows in the database. Navigate to the column named as "Backend_model" and then you will see one of the entry written as
catalog/product_attribute_backend_startdate_specialprice
因此,将上面的条目更改为
So, change the above entry to
catalog/product_attribute_backend_startdate
保存数据库,然后刷新magento前端/后端上的页面(创建并保存新产品).
Save the database and then refresh the page on the magento frontend/backend (create and save a new product).
我希望一切正常.祝你好运!
I hope everything is working fine. Good Luck!
干杯, 幼稚的.
PS:感谢所有帮助他人学习的人.
PS: Thanks to all who helps others to learn.
这篇关于我尝试从管理员添加特价时出现Magento错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!