AvS_FastSimpleImport icon indicating copy to clipboard operation
AvS_FastSimpleImport copied to clipboard

Advice Needed: How to import non-standard stock item attributes data

Open WinstonN opened this issue 10 years ago • 0 comments

Hello

I have added two extra stock item attributes representing warehouse inventory (not to be confused with qty) and warehouse qty assigned to orders. They are wh_qty and wh_qty_assigned.

When I try to import data to them I see the data is there but get's lost at this line app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php L1202 (I'm using the development branch)

$row = array_merge(
    $row,
    $defaultStockData,
        array_intersect_key($existStockData, $defaultStockData),
        array_intersect_key($rowData, $defaultStockData)
);

If I change $defaultStockData to the below then it works

$defaultStockData = array(
            'manage_stock'                  => 1,
            'use_config_manage_stock'       => 1,
            'qty'                           => 0,
            'min_qty'                       => 0,
            'use_config_min_qty'            => 1,
            'min_sale_qty'                  => 1,
            'use_config_min_sale_qty'       => 1,
            'max_sale_qty'                  => 10000,
            'use_config_max_sale_qty'       => 1,
            'is_qty_decimal'                => 0,
            'backorders'                    => 0,
            'use_config_backorders'         => 1,
            'notify_stock_qty'              => 1,
            'use_config_notify_stock_qty'   => 1,
            'enable_qty_increments'         => 0,
            'use_config_enable_qty_inc'     => 1,
            'qty_increments'                => 0,
            'use_config_qty_increments'     => 1,
            'is_in_stock'                   => 0,
            'low_stock_date'                => null,
            'stock_status_changed_auto'     => 0,
            'wh_qty'                        => 0,
            'wh_qty_assigned'               => 0,
        );

Can you suggest a way that I can accomplish this? I see the method is an override but not quite sure how to approach this

Thank you!

WinstonN avatar Sep 03 '15 17:09 WinstonN