/** * @param \Generated\Shared\Transfer\PriceProductTransfer $transferPriceProduct * * @return bool */ protected function isPriceTypeExistingForProductConcrete(PriceProductTransfer $transferPriceProduct) { $priceType = $this->reader->getPriceTypeByName($transferPriceProduct->getPriceTypeName()); $priceEntities = $this->queryContainer->queryPriceEntityForProductConcrete($transferPriceProduct->getSkuProduct(), $priceType); return $priceEntities->count() > 0; }
/** * @api * * @param \Generated\Shared\Transfer\PriceProductTransfer $transferPriceProduct * @param \Orm\Zed\Price\Persistence\SpyPriceType $priceType * * @return \Orm\Zed\Price\Persistence\SpyPriceProductQuery */ public function querySpecificPriceForProductConcrete(PriceProductTransfer $transferPriceProduct, SpyPriceType $priceType) { return $this->getFactory()->createPriceProductQuery()->filterByPrice($transferPriceProduct->getPrice())->filterByPriceType($priceType)->useProductQuery()->filterBySku($transferPriceProduct->getSkuProduct())->endUse(); }