Exemplo n.º 1
0
 /**
  * @param \Generated\Shared\Transfer\PriceProductTransfer $priceProductTransfer
  *
  * @return bool
  */
 protected function isPriceTypeExistingForProductAbstract(PriceProductTransfer $priceProductTransfer)
 {
     $priceType = $this->reader->getPriceTypeByName($priceProductTransfer->getPriceTypeName());
     $priceEntities = $this->queryContainer->queryPriceEntityForProductAbstract($priceProductTransfer->getSkuProductAbstract(), $priceType);
     return $priceEntities->count() > 0;
 }
Exemplo n.º 2
0
 /**
  * @param string $sku
  * @param \Orm\Zed\Price\Persistence\SpyPriceType $priceType
  *
  * @return \Orm\Zed\Price\Persistence\SpyPriceProduct
  */
 protected function getPriceEntityForProductAbstract($sku, $priceType)
 {
     return $this->queryContainer->queryPriceEntityForProductAbstract($sku, $priceType)->findOne();
 }