#83 "is_in_stock" doesnt work!

v1.0_(example)
open
nobody
None
1
2014-01-30
2014-01-30
Buffet
No

!/usr/bin/php

$dp = Magmi_DataPumpFactory::getDataPumpInstance("productimport");

$dp->beginImportSession("default", "update");

$product = array(
'store' => 'admin',
'sku' => 'A12345',
'cost' => 15000,
'is_in_stock' => 1, //or true|false
);

$dp->ingest($product);

$dp->endImportSession();

Discussion

  • Buffet

    Buffet - 2014-01-30

    magmi/engines/magmi_productimportengine.php Line 1186
    public function handleIgnore(&$item)
    {
    //filter MAGMI_IGNORE COLUMNS
    foreach($item as $k=>$v)
    {
    if($v=="MAGMI_IGNORE") //This is BUG! if $v is 0(interger), unset($item[$k]) is executed.
    {
    unset($item[$k]);
    }
    }
    }

    the correct statment should be..............
    if($v==="MAGMI_IGNORe")

    === (NOT ==)

     
  • Buffet

    Buffet - 2014-01-30

    enable_googlecheckout, is_in_stock...etc
    the attributes above use 1 or 0
    if( 1=='MAGMI_IGNORE' )
    if( 0=='MAGMI_IGNORE' )
    cause incorrect result.

    sorry for my poor english....sorry.

     
    Last edit: Buffet 2014-01-30

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks