setSku ( (string)$entry->Varenummer ); $confProduct->setName ( (string)$entry->Tekst ); $confProduct->setDescription ( (string)$entry->Beskrivelse ); $confProduct->setPrice ( (string)$entry->Salgspris ); $confProduct->setSpecialPrice ( (string)$entry->Tilbudspris ); $confProduct->setTypeId ( Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE ); //$confProduct->setSpecialPrice ( 100 ); array_push ( $products, $confProduct ); if ( !(string)$entry->V2 ) $entry->V2 = "ONESIZE"; //foreach ( array ((string)$entry->V1, (string)$entry->V2, (string)$entry->V3 ) as $size ) { $size = $entry->V2; $simpleProduct = new Varien_Object(); //if ( (string)$entry->Stregkode == (string)$entry->Varenummer ) $barcode = (string)$entry->Stregkode . "_".$size; //else $barcode = (string)$entry->Stregkode; $barcode = (string)$entry->Stregkode; $simpleProduct->setSku ( (string)$barcode ); $simpleProduct->setParentSku ( (string)$entry->Varenummer ); $simpleProduct->setTypeId ( Mage_Catalog_Model_Product_Type::TYPE_SIMPLE ); $simpleProduct->setSize ( (string)$size ); $simpleProduct->setQty ( (int)$entry->Lagerantal ); $simpleProduct->setName ( (string)$entry->Tekst ); array_push ( $products, $simpleProduct ); //} return $products; } public function getProducts ( $params ) { $this->_xmlFilename = "./var/test.xml"; $this->_productTag = "Vare"; return parent::getProducts ( $params ); } }