News:

Looking for documentation? Take a look on our wiki

Main Menu

Save product with Product Model -> store() ?

Started by andrew.overlord, September 09, 2013, 16:48:13 PM

Previous topic - Next topic

andrew.overlord

Hi!
I'm trying to write a component for importing product through uploaded pricelist.
I'm using VmModel::getModel ('product')->store($mydata).
The data is written successfully #__virtuemart_products_LANG table, but the #__virtuemart_products table is empty.
What am I doing wrong?
Thanx. (Sorry for my bad english)

andrew.overlord

additional info:

$product_data=array(
            'virtuemart_product_id'=>ID HERE,
            'virtuemart_vendor_id'=>'',
            'product_parent_id'=>'',
            'product_sku'=>'',
            'product_name'=>'',
            'slug'=>'',
            'product_s_desc'=>'',
            'product_desc'=>'',
            'product_weigth'=>'',
            'product_width'=>'',
            'product_heigth'=>'',
            'product_lwh_uom'=>'',
            'product_url'=>'',
            'product_in_stok'=>'',
            'product_ordered'=>'',
            'low_stok_notification'=>'',
            'product_available_date'=>'',
            'product_availability'=>'',
            'product_special'=>'',
            'pordering'=>'',
            'product_unit'=>'',
            'product_packaging'=>'',
            'product_params'=>'',
            'intnotes'=>'',       
        );

If the product exists with 'virtuemart_product_id' - it's work (save changes).
If I don't use 'virtuemart_product_id' it's work too (simply add value to DB).