News:

Support the VirtueMart project and become a member

Main Menu

Access to Virtuemart Tables

Started by gabriellg, November 19, 2012, 17:58:20 PM

Previous topic - Next topic

gabriellg

Hi!

I have a component and I am trying to access virtuemart tables. I want to create a manufacterer into manufacturers table. This is my code:



JTable::addIncludePath(JPATH_VM_ADMINISTRATOR.DS.'tables');

$row = &JTable::getInstance('manufacturers', 'Table');
$row->mf_name = $mf_name;

if (!$row->store())
    throw new Exception($row->getError());


But I get an error when store my manufacturer. This is the error:

TableManufacturers: :almacenamiento fallido
Unknown column 'mf_name' in 'field list' SQL=INSERT INTO `prueba_virtuemart_manufacturers` (`virtuemart_manufacturer_id`,`mf_name`,`slug`,`mf_email`,`mf_desc`,`virtuemart_manufacturercategories_id`,`mf_url`,`published`,`created_on`,`created_by`,`modified_on`,`modified_by`) VALUES ('0','bliddyspam','','','','0','','1','2012-11-19 16:52:49','665','2012-11-19 16:52:49','665')

Can Anyone help me, please?

Thank you!

PRO

virtuemart_manufacturers_en_gb

_en_gb  = language

it's in 2 tables

"text" is usually in the language 1



gabriellg