Magento Forum

   
Import product: Product Stock_Data Attribute Question
 
techunar
Jr. Member
 
Total Posts:  2
Joined:  2010-09-14
 

Here is the Products Attributes that I set in order to save product into Magento:

$productData[’name’] = $data[’name’];
$productData[’sku’] = $data[’product_id’];
$productData[’price’] = $data[’price’];
$productData[’is_imported’] = ‘Yes’;
$productData[’weight’] = 1;
$productData[’stock_data’] = array(’qty’=>$data[’qty’]);
$productData[’qty’] = $data[’qty’];
$productData[’import_sku’] = $data[’sku’];
$productData[’tax_class_id’] = ‘None’;
$productData[’import_category_id’] = $data[’category_id’];
$productData[’category_name’] = $data[’category_name’];
$productData[’visibility’] = ‘Catalog, Search’;

Please note, that if I set stock_data (I provide product quantity to it), then after the import, this product is set as Out of Stock, however quantity is present for this product (more than 1), I want this product to be In Stock if it has more than 1 quantity. Where as, if I don’t set Stock_Data then I can’t supply product quantity and inventory is disabled.

Looking forward for your help.

Regards,
tech

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top