Importing products with no category using on the fly category creator/importer v0.2.3

Zxurian
2013-05-08
2013-05-09
  • Zxurian

    Zxurian - 2013-05-08

    I have products in my import csv that have the "categories" field blank, as I do not want these products in any category, however a warning comes up with

    Invalid category ids found for sku 9781400150045:
    

    for each empty category.

    Can the plugin be updated to handle this case scenario?

     
  • Zxurian

    Zxurian - 2013-05-09

    For reference, I was able to solve the error by editing the following lines in categoryimport.php by wrapping the foreach in a count() check (lines 410-420)

            if (count($catlist) >= 1 && $catlist[0] != '') {
                foreach($catlist as $catdef)
                {   
                        $cdef=$this->getCategoryIdsFromDef($catdef,$rootpaths);
                        if($this->getParam("CAT:lastonly",0)==1)
                        {
                            $cdef=array($cdef[count($cdef)-1]);
                        }
                        $catids=array_unique(array_merge($catids,$cdef));
                }
            }
    
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks