|
|
|
|
|
|
|
|
$existingAxicoIdIsNotRevoked = $existingAxicoIdEntity->getRevoked() < 1; |
|
|
$existingAxicoIdIsNotRevoked = $existingAxicoIdEntity->getRevoked() < 1; |
|
|
$existingAxicoIdEntity->close(); |
|
|
$existingAxicoIdEntity->close(); |
|
|
$existingAxicoIdEntity = $this->getAxicoIdFactory()->update($existingAxicoIdEntity); |
|
|
$existingAxicoIdEntity = $this->getAxicoIdFactory()->update($existingAxicoIdEntity); |
|
|
|
|
|
|
|
|
|
|
|
$this->getAxicoIdFactory()->updatePair($existingAxicoIdEntity); |
|
|
|
|
|
|
|
|
$result['axicoIdContinued']++; |
|
|
$result['axicoIdContinued']++; |
|
|
|
|
|
|
|
|
if ($existingAxicoIdIsNotRevoked) { |
|
|
if ($existingAxicoIdIsNotRevoked) { |
|
|
if ($product->isComponentBased()) { |
|
|
if ($product->isComponentBased()) { |
|
|
$newAxicoIdEntity = $this->getAxicoIdFactory()->createForComponent($component->getParentManufacturerId(), $component->getId()); |
|
|
|
|
|
|
|
|
$newAxicoIdEntity = $this->getAxicoIdFactory()->createForComponent($component->getParentManufacturerId(), $component->getId()); |
|
|
} else { |
|
|
} else { |
|
|
$newAxicoIdEntity = $this->getAxicoIdFactory()->createForCategory($product->getParentManufacturerId(), $product->getParentCategoryId()); |
|
|
$newAxicoIdEntity = $this->getAxicoIdFactory()->createForCategory($product->getParentManufacturerId(), $product->getParentCategoryId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$nextGroupAxicoId = $this->getAxicoIdFactory()->findOrCreateNextAxicoIdByManufacturerIdAndComponentId($component->getParentManufacturerId(), $component->getId()); |
|
|
$nextGroupAxicoId = $this->getAxicoIdFactory()->findOrCreateNextAxicoIdByManufacturerIdAndComponentId($component->getParentManufacturerId(), $component->getId()); |
|
|
} |
|
|
} |
|
|
$currentCount = $storedAxicoIdEntity->getCurrentCount(); |
|
|
$currentCount = $storedAxicoIdEntity->getCurrentCount(); |
|
|
$nextGroupAxicoId->setId(null); |
|
|
|
|
|
|
|
|
// $nextGroupAxicoId->setId(null); |
|
|
$nextGroupAxicoId->setCurrentCount($currentCount); |
|
|
$nextGroupAxicoId->setCurrentCount($currentCount); |
|
|
$nextGroupAxicoId->setRevoked($storedAxicoIdEntity->getRevoked()); |
|
|
$nextGroupAxicoId->setRevoked($storedAxicoIdEntity->getRevoked()); |
|
|
$this->getAxicoIdFactory()->save($nextGroupAxicoId); |
|
|
$this->getAxicoIdFactory()->save($nextGroupAxicoId); |