Magento error when I try to add a special price from admin

The error I get is: Invalid base model: / product _attribute_backend_startdate_specialprice directory

This is a local copy of magento, but I would not want to recreate the whole thing on a live site. What ideas can I make to fix this?

+4
source share
5 answers

The above solution did not work in my case, since I did not develop any module, so I could not find a file named "specialprice" in the above path.

I installed the module and it changed the base path "specialprice" in the database to catalog/product_attribute_backend_startdate_specialprice

Here is the solution if you are stuck in the same problem as me:

, specialprice 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> .

. "Backend_model", ,

catalog/product_attribute_backend_startdate_specialprice

,

catalog/product_attribute_backend_startdate

, / magento ( ).

, . !

Cheers, .

PS: , .

+12

phpMyadmin

magento db

eav_attribute

, backend_model of:

/ product_attribute_backend_startdate_specialprice

SQL phpMyadmin:

SELECT * FROM `magentodbname`.`eav_attribute` WHERE `backend_model` = 'catalog/product_attribute_backend_startdate_specialprice'

:

'EAV/entity_attribute_backend_datetime

+6

( catalog/product_attribute_backend_startdate_specialprice catalog/product_attribute_backend_startdate eav_attribute), , .

Magento 1.9 catalog/product_attribute_backend_startdate_specialprice, Magento 1.8 , ​​ 1.9.

, Magento, . , , .

+4
source

The backend model in defautl Magento

catalog/product_attribute_backend_startdate

located in

Application \ Code \ Kernel \ Mage \ Catalog \ Model \ Product \ Attribute \ Backend \ Startdate.php

If you are working with your custom module, and the specified base model is

catalog/product_attribute_backend_startdate_specialprice

then you need to create a path to something like this

\ Catalog \ Model \ Product \ Attribute \ Backend \ STARTDATE \ Specialprice.php

Change the local / community path if necessary .

+1
source

Run the following query:

UPDATE eav_attribute 
    SET backend_model = 'eav/entity_attribute_backend_datetime' 
    WHERE backend_model = 'catalog/product_attribute_backend_startdate_specialprice';
0
source

Source: https://habr.com/ru/post/1541169/


All Articles