VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: gabriellg on November 19, 2012, 17:58:20 PM

Title: Access to Virtuemart Tables
Post by: gabriellg on November 19, 2012, 17:58:20 PM
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!
Title: Re: Access to Virtuemart Tables
Post by: PRO on November 19, 2012, 22:01:30 PM
virtuemart_manufacturers_en_gb

_en_gb  = language

it's in 2 tables

"text" is usually in the language 1


Title: Re: Access to Virtuemart Tables
Post by: gabriellg on November 21, 2012, 09:32:59 AM
Sorry,

Thank you very much.