I am trying to setup a module that will extract my Base (CAD) Canadian prices and show converted USD price. To me it seems like I set up everything as needed, but there is error in the admin panel when I try to EXTRACT product data.
ERROR: Invalid backend model specified: customcatattrb/product_attribute_backend
/htdocs/app/code/local/Meteorify/Customcatattrb/sql/customcatattrb_setup/mysql4-install-0.0.1.php
<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'price_usd', array(
'type' => 'decimal',
'label' => 'USD Price',
'input' => 'text',
'backend' => 'customcatattrb/product_attribute_backend_usdprice',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE,
'required' => false,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'is_configurable' => false,
'group' => 'Price'
));
$installer->endSetup();
?>
htdocs/app/code/local/Meteorify/Customcatattrb/Model/Product/Attribute/Backend/Usdprice.php
class Meteorify_Customcatattrb_Model_Product_Attribute_Backend_Usdprice extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
/**
* Before save method
*
* @param Varien_Object $object
*
* @return Mage_Eav_Model_Entity_Attribute_Backend_Abstract
*/
public function beforeSave($object)
{
$attrCode = $this->getAttribute()->getAttributeCode();
$basePrice = $object->getData('price');
$value = Mage::helper('directory')->currencyConvert($basePrice, Mage::app()->getStore()->getDefaultCurrencyCode(), 'USD');
$object->setData($attrCode, $value);
return $this;
}
}
Could someone please check the codes above and see if there are any problems causing the error
Invalid backend model specified: customcatattrb/product_attribute_backend
<models>
node correctly in theconfig.xml
? Paste it here, if you can.