public static function doCall($itemid)
 {
     $plentyObject = parent::getInstance();
     $GetItemsImages_req = ['GetItemsImages' => ['SKU' => $itemid]];
     $GetItemsImages = $plentyObject->__soapCall('GetItemsImages', $GetItemsImages_req);
     return $GetItemsImages;
 }
 public static function doCall($propertieID)
 {
     $plentyObject = parent::getInstance();
     $GetProperties = [['PropertyGroupID' => $propertieID]];
     $result = $plentyObject->__soapCall('GetProperties', $GetProperties);
     return $result;
 }
 public static function doCall($producer)
 {
     $plentyObject = parent::getInstance();
     $result = $plentyObject->__soapCall('SetProducers', [['Producers' => [['ProducerName' => $producer]]]]);
     $ProducerID = $result->ResponseMessages->item[0]->SuccessMessages->item[0]->Value;
     return $ProducerID;
 }
 public static function doCall($itemid)
 {
     $plentyObject = parent::getInstance();
     $GetItemsBase = ['GetItemsBase' => ['ItemID' => $itemid, 'GetItemOthers' => 1, 'GetCategories' => 1, 'GetShortDescription' => 1, 'GetLongDescription' => 1]];
     $GetItemsBase_result = $plentyObject->__soapCall('GetItemsBase', $GetItemsBase);
     return $GetItemsBase_result;
 }
 public static function doCall($itemID, $number, $typ = 'ASIN')
 {
     $plentyObject = parent::getInstance();
     $Numbers = [['MarketItemNumbers' => [['CountryID' => '1', 'MarketItem' => $typ, 'MarketItemValue' => $number, 'SKU' => $itemID]]]];
     $result = $plentyObject->__soapCall('SetMarketItemNumbers', $Numbers);
     return $result;
 }
 public static function doCall($FormatID, $FormatName, $time)
 {
     $plentyObject = parent::getInstance();
     do {
         $GetDynamicExport_ar[] = ['FormatID' => $FormatID, 'FormatName' => $FormatName, 'Offset' => $offset];
         // Call absetzten
         $GetDynamicExport = $plentyObject->__soapCall('GetDynamicExport', $GetDynamicExport_ar);
         // Wir zählen das Array ob nochmal abgerufen werden muss
         $counter = count($GetDynamicExport->Content->item);
         // Löschen das Array
         unset($GetDynamicExport_ar);
         // Hochsetzten des Offset
         $offset = $offset + ($counter - 1);
         // ...und ballern alles ins Array
         $counter = 0;
         foreach ($GetDynamicExport->Content->item as $item) {
             // ignore first line
             //if ($counter++ == 1) continue;
             $zeile = explode(';', $item->Value);
             if (strpos($zeile[0], $time) !== false) {
                 $Alle_Artikel[] = $zeile;
             } else {
                 $end = true;
             }
         }
         // wenn das ende erreicht
         if ($end == true) {
             break;
         }
     } while (true);
     return $Alle_Artikel;
 }
 public static function doCall($OrderID, $OrderStatus)
 {
     $plentyObject = parent::getInstance();
     $SetOrderStatus = [['OrderStatus' => [['OrderID' => $OrderID, 'OrderStatus' => $OrderStatus]]]];
     $result = $plentyObject->__soapCall('SetOrderStatus', $SetOrderStatus);
     return $result;
 }
 public static function doCall($needle)
 {
     $plentyObject = parent::getInstance();
     $GetCustomers_req = [['SearchString' => $needle]];
     $GetCustomers = $plentyObject->__soapCall('GetCustomers', $GetCustomers_req);
     return $GetCustomers;
 }
 public static function doCall()
 {
     $plentyObject = parent::getInstance();
     $SetDynamicExport_req = [['DynamicExportItems' => [['Fields' => [['FieldName' => 'OrderID', 'ImportProcedure' => 1, 'IndividualFieldName' => 'OrderID', 'Position' => 1], ['FieldName' => 'CustomerID', 'ImportProcedure' => 1, 'IndividualFieldName' => 'CustomerID', 'Position' => 2], ['FieldName' => 'OrderTimestamp', 'ImportProcedure' => 1, 'IndividualFieldName' => 'OrderTimestamp', 'Position' => 3]], 'Filter' => [['FilterName' => 'OrderTimestamp', 'Operator' => '0', 'Value' => '1448928000']], 'ID' => '8']]]];
     //print_r($SetDynamicExport_req);
     $SetDynamicExport = $plentyObject->__soapCall('SetDynamicExport', $SetDynamicExport_req);
     return $SetDynamicExport;
 }
 public static function doCall()
 {
     $plentyObject = parent::getInstance();
     $result = $plentyObject->__soapCall('GetProducers', array());
     foreach ($result->Producers->item as $producer) {
         $producer_array[$producer->ProducerName] = $producer->ProducerID;
     }
     return $producer_array;
 }
 public static function doCall(array $itemArray)
 {
     $plentyObject = parent::getInstance();
     $itemsBase = [['BaseItems' => [['EAN1' => $itemArray['Base']['EAN1'], 'EAN2' => $itemArray['Base']['EAN2'], 'EAN3' => $itemArray['Base']['EAN3'], 'EAN4' => $itemArray['Base']['EAN4'], 'Model' => $itemArray['Base']['Model'], 'ItemNo' => $itemArray['Base']['ItemNo'], 'ProducerID' => $itemArray['Base']['ProducerID'], 'Marking1ID' => $itemArray['Base']['Marking1ID'], 'Marking2ID' => $itemArray['Base']['Marking2ID'], 'Categories' => [['ItemCategoryPath' => $itemArray['Categories']['CategoryPath'], 'ItemCategoryID' => $itemArray['Categories']['CategoryID']]], 'Availability' => ['WebAPI' => $itemArray['Availability']['WebAPI'], 'AmazonProduct' => $itemArray['Availability']['AmazonProduct'], 'Webshop' => $itemArray['Availability']['Webshop'], 'Allyouneeed' => $itemArray['Availability']['MeinPaket']], 'Others' => ['EbayCategory1' => $itemArray['Others']['EbayCategory'], 'EbayShopCategory1' => $itemArray['Others']['EbayShopCategory']], 'FreeTextFields' => ['Free1' => $itemArray['FreeTextFields']['Field1'], 'Free2' => $itemArray['FreeTextFields']['Field2'], 'Free3' => $itemArray['FreeTextFields']['Field3'], 'Free4' => $itemArray['FreeTextFields']['Field4'], 'Free5' => $itemArray['FreeTextFields']['Field5']], 'Stock' => ['MainWarehouseID' => $itemArray['Stock']['MainWarehouseID'], 'Limitation' => $itemArray['Stock']['Limitation'], 'WebshopInvisibleNoStock' => $itemArray['Stock']['WebshopInvisibleNoStock'], 'WebshopVisiblePositiveStock' => $itemArray['Stock']['WebshopVisiblePositiveStock'], 'ChangeAvailablePositiveStock' => $itemArray['Stock']['ChangeAvailablePositiveStock'], 'ChangeNotAvailableNoStock' => $itemArray['Stock']['ChangeNotAvailableNoStock'], 'ChangeAvailablePositiveStockVariant' => $itemArray['Stock']['ChangeAvailablePositiveStockVariant']], 'StoreIDs' => [['intValue' => 0]], 'PriceSet' => ['Price' => $itemArray['PriceSet']['Price'], 'Price1' => $itemArray['PriceSet']['Price1'], 'RRP' => $itemArray['PriceSet']['RRP'], 'PurchasePriceNet' => $itemArray['PriceSet']['PurchasePriceNet']], 'Texts' => [['Lang' => 'de', 'Name' => $itemArray['Texts']['Name'], 'Name2' => $itemArray['Texts']['Name2'], 'LongDescription' => $itemArray['Texts']['LongDescription'], 'ShortDescription' => $itemArray['Texts']['ShortDescription']]], 'ParcelServicePresetIDs' => [['intValue' => $itemArray['ParcelServicePresetIDs']['Value']]]]]]];
     // CALL PLENTY
     $result = $plentyObject->__soapCall('SetItemsBase', $itemsBase);
     // NEW ITEM ID
     $itemID = $result->ResponseMessages->item[0]->SuccessMessages->item[0]->Value;
     return $itemID;
 }
 public static function doCall($itemID, array $properties)
 {
     $plentyObject = parent::getInstance();
     // array für die merkmale
     foreach ($properties as $PropertyId => $PropertyItemValue) {
         $properies_array[] = ['ItemId' => $itemID, 'PropertyId' => $PropertyId, 'PropertyItemValue' => $PropertyItemValue, 'Lang' => 'de'];
     }
     $result = $plentyObject->__soapCall('SetPropertiesToItem', [['PropertyToItemList' => $properies_array]]);
     return $result;
 }
 public static function doCall($itemID, $StorageLocation, $reason = 100, $stock = 1)
 {
     $plentyObject = parent::getInstance();
     // SKU suchen
     $SKUresult = $plentyObject->__soapCall('SearchItemsSKU', [['ItemID' => $itemID]]);
     $location = preg_split("/[LS](?=[0-9])/", $StorageLocation, NULL, PREG_SPLIT_NO_EMPTY);
     $item_Stocks = [['IncomingStocks' => [['SKU' => $SKUresult->ItemsList->item[0]->SKU, 'WarehouseID' => $location[0], 'StorageLocation' => $location[1], 'PhysicalStock' => $stock, 'Reason' => $reason]]]];
     $result = $plentyObject->__soapCall('SetIncomingStocks', $item_Stocks);
     return $result;
 }
 public static function doCall()
 {
     $plentyObject = parent::getInstance();
     $GetSalesOrderReferrer_req = array();
     $Referrer = $plentyObject->__soapCall('GetSalesOrderReferrer', $GetSalesOrderReferrer_req);
     // pimp array
     foreach ($Referrer->SalesOrderReferrers->item as $item) {
         $return_array["{$item->SalesOrderReferrerID}"] = ['Name' => $item->Name];
     }
     return $return_array;
 }
 public static function doCall($propertyID)
 {
     $plentyObject = parent::getInstance();
     $GetPropertiesList = ['PropertyGroups' => ['PropertyGroupID' => $propertyID]];
     $result = $plentyObject->__soapCall('GetPropertiesList', $GetPropertiesList);
     // Wir geben ein hübsches Array zurück
     foreach ($result->PropertyGroups->item as $item) {
         $PropertiesList[$item->PropertyGroupName] = $item->Properties->item;
     }
     return $PropertiesList;
 }
 public static function doCall()
 {
     $plentyObject = parent::getInstance();
     $GetPropertyGroups = [['Lang' => 'de']];
     $result = $plentyObject->__soapCall('GetPropertyGroups', $GetPropertyGroups);
     // Wir geben ein schönes Aray zurück
     foreach ($result->PropertyGroups->item as $item) {
         $PropertyGroups[$item->BackendName] = $item->PropertyGroupID;
     }
     return $PropertyGroups;
 }
 public static function doCall($orderid, $type = 'order')
 {
     $plentyObject = parent::getInstance();
     if (strpos($orderid, '-')) {
         $SearchOrders_req = [['ExternalOrderID' => $orderid, 'OrderType' => '$type', 'GetOrderCustomerAddress' => '1']];
         $SearchOrders = $plentyObject->__soapCall('SearchOrders', $SearchOrders_req);
     } else {
         $SearchOrders_req = [['OrderType' => 'order', 'OrderID' => $orderid, 'GetOrderCustomerAddress' => '1']];
         $SearchOrders = $plentyObject->__soapCall('SearchOrders', $SearchOrders_req);
     }
     return $SearchOrders;
 }
 public static function doCall()
 {
     $plentyObject = parent::getInstance();
     $GetRacksList_result = $plentyObject->__soapCall('GetRacksList', array());
     foreach ($GetRacksList_result->WarehouseList->item[1]->RacksList->item as $Rack) {
         foreach ($Rack->ShelvesList->item as $shelve) {
             foreach ($shelve->StorageLocationsList->item as $item) {
                 $PlentyLagerOrtArray[$item->StorageLocationName] = 'L103S' . $item->StorageLocationId;
             }
         }
     }
     return $PlentyLagerOrtArray;
 }
 public static function doCall($begin, $end, $OrderStatus = NULL, $OrderType = 'order')
 {
     $plentyObject = parent::getInstance();
     $i = 0;
     do {
         $SearchOrders_req = [['OrderType' => $OrderType, 'OrderCreatedFrom' => $begin, 'OrderCreatedTill' => $end, 'OrderStatus' => $OrderStatus, 'Page' => $i]];
         $SearchOrders = $plentyObject->__soapCall('SearchOrders', $SearchOrders_req);
         foreach ($SearchOrders->Orders->item as $item) {
             $orderArray[] = $item;
         }
         $i++;
     } while ($SearchOrders->Pages >= $i);
     return $orderArray;
 }
 public static function doCall($needle)
 {
     $plentyObject = parent::getInstance();
     $getCategorys_req = [['GetCategoryNames' => TRUE]];
     $getCategorys = $plentyObject->__soapCall('GetItemCategoryTree', $getCategorys_req);
     //return $getCategorys;
     // make an useable array
     foreach ($getCategorys->MultishopTree->item[0]->CategoryTree->item as $Item) {
         print_r($Item);
         // we need the last Item of the Tree
         //$lastItem = array_pop( explode(';', $Item['CategoryPathNames']) );
         //echo $lastItem;
         //$categoryArray[]
     }
 }
 public static function doCall(array $Images)
 {
     $plentyObject = parent::getInstance();
     /*
             	  NEED'S AN ARRAY LIKE THIS -> $Array = ['itemID' => 9039, 'images' => [ $testbild1, $testbild2, $testbild3 ]];                       
     */
     $CallArray = [['CallItemsLimit' => 5, 'ItemID' => $Images['itemID'], 'Images' => array()]];
     $i = 1;
     foreach ($Images['images'] as $data) {
         $ImageArray[] = ['ImageFileData' => $data, 'ImageFileName' => 'bild_' . $i, 'ImageFileEnding' => '.jpg'];
         $i++;
     }
     $CallArray[0]['Images'] = $ImageArray;
     $result = $plentyObject->__soapCall('SetItemImages', $CallArray);
     return $result;
 }
 public static function doCall($ListingStatus = 'active')
 {
     $plentyObject = parent::getInstance();
     $i = 0;
     $listings = array();
     do {
         $GetListings = [['Page' => $i, 'GetListings' => [['ListingStatus' => $ListingStatus]]]];
         $GetListings_result = $plentyObject->__soapCall('GetListings', $GetListings);
         foreach ($GetListings_result->ListingsList->item as $item) {
             array_push($listings, $item);
         }
         $pages = $GetListings_result->Pages;
         $i++;
     } while ($i <= $pages);
     return $listings;
 }
 public static function doCall($FormatID, $FormatName, $firstline = FALSE)
 {
     $plentyObject = parent::getInstance();
     do {
         $GetDynamicExport_ar[] = ['FormatID' => $FormatID, 'FormatName' => $FormatName, 'Offset' => $offset];
         // Call absetzten
         $GetDynamicExport = $plentyObject->__soapCall('GetDynamicExport', $GetDynamicExport_ar);
         // Fehler abfangen
         if ($GetDynamicExport->ResponseMessages->item[0]->Code == 800) {
             throw new Exception('error with DynamicExport! ERROR CODE: 800');
             exit;
         }
         // Wir zählen das Array ob nochmal abgerufen werden muss
         $counter = count($GetDynamicExport->Content->item);
         // Löschen das Array
         unset($GetDynamicExport_ar);
         // Hochsetzten des Offset
         $offset = $offset + ($counter - 1);
         // 1.Zeile mit Headerdaten füllen wenn TRUE
         if ($firstline == TRUE) {
             $export[0] = explode(';', $GetDynamicExport->Content->item[0]->Value);
         }
         // ...und ballern alles ins Export Array
         $z = false;
         foreach ($GetDynamicExport->Content->item as $item) {
             // ignore first line
             if ($z == false) {
                 $z = true;
                 continue;
             }
             $zeile = explode(';', $item->Value);
             $export[] = $zeile;
         }
     } while ($counter > 998);
     return $export;
 }
 public static function doCall($ItemID)
 {
     $plentyObject = parent::getInstance();
     $SKUresult = $plentyObject->__soapCall('SearchItemsSKU', [['ItemID' => $ItemID]]);
     return $SKUresult->ItemsList->item[0]->SKU;
 }