|
|
@@ -6,6 +6,7 @@ use App\Entity\OrderProductReductionCatalog; |
|
|
|
use App\Entity\OrderShop; |
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
use Lc\ShopBundle\Context\MerchantUtilsInterface; |
|
|
|
use Lc\ShopBundle\Context\OrderShopInterface; |
|
|
|
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; |
|
|
|
use Symfony\Component\Security\Core\Security; |
|
|
|
|
|
|
@@ -26,7 +27,7 @@ class OrderUtils |
|
|
|
$this->security = $security; |
|
|
|
$this->userUtils = $userUtils; |
|
|
|
$this->merchantUtils = $merchantUtils; |
|
|
|
$this->orderShopRepo = $this->em->getRepository(OrderShop::class); |
|
|
|
$this->orderShopRepo = $this->em->getRepository($this->em->getClassMetadata(OrderShopInterface::class)->getName()); |
|
|
|
$this->priceUtils = $priceUtils ; |
|
|
|
$this->productFamilyUtils = $productFamilyUtils ; |
|
|
|
} |
|
|
@@ -46,7 +47,7 @@ class OrderUtils |
|
|
|
$paramsSearchOrderShop['visitor'] = $visitor; |
|
|
|
} |
|
|
|
|
|
|
|
$orderShop = $this->orderShopRepo->findOneBy($paramsSearchOrderShop); |
|
|
|
$orderShop = $this->orderShopRepo->findCurrent($paramsSearchOrderShop); |
|
|
|
|
|
|
|
if (!$orderShop) { |
|
|
|
$orderShop = $this->createOrderShop([ |