/** * Rolls back the item (delete all mappings and the item in plentymarkets) */ protected function rollback() { // Delete the item in plentymarktes $Request_DeleteItems = new PlentySoapRequest_DeleteItems(); $Request_DeleteItems->DeleteItems = array(); $Object_DeleteItems = new PlentySoapObject_DeleteItems(); $Object_DeleteItems->ItemID = $this->PLENTY_itemID; $Request_DeleteItems->DeleteItems[] = $Object_DeleteItems; PlentymarketsSoapClient::getInstance()->DeleteItems($Request_DeleteItems); PlentymarketsLogger::getInstance()->message('Export:Initial:Item', 'The item with the id »' . $this->PLENTY_itemID . '« has been deleted in plentymarkets'); // Delete the mapping for the main item PlentymarketsMappingController::deleteItemByShopwareID($this->SHOPWARE_Article->getId()); // And for the details foreach ($this->SHOPWARE_Article->getDetails() as $ItemVariation) { PlentymarketsMappingController::deleteItemVariantByShopwareID($ItemVariation->getId()); } }
/** * {@inheritDoc} */ public function getDetails() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDetails', array()); return parent::getDetails(); }