|
|
|
|
|
|
|
|
use App\Entity\OrderShop; |
|
|
use App\Entity\OrderShop; |
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
use Lc\ShopBundle\Context\MerchantUtilsInterface; |
|
|
use Lc\ShopBundle\Context\MerchantUtilsInterface; |
|
|
|
|
|
use Lc\ShopBundle\Context\OrderShopInterface; |
|
|
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; |
|
|
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->security = $security; |
|
|
$this->security = $security; |
|
|
$this->userUtils = $userUtils; |
|
|
$this->userUtils = $userUtils; |
|
|
$this->merchantUtils = $merchantUtils; |
|
|
$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->priceUtils = $priceUtils ; |
|
|
$this->productFamilyUtils = $productFamilyUtils ; |
|
|
$this->productFamilyUtils = $productFamilyUtils ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$paramsSearchOrderShop['visitor'] = $visitor; |
|
|
$paramsSearchOrderShop['visitor'] = $visitor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$orderShop = $this->orderShopRepo->findOneBy($paramsSearchOrderShop); |
|
|
|
|
|
|
|
|
$orderShop = $this->orderShopRepo->findCurrent($paramsSearchOrderShop); |
|
|
|
|
|
|
|
|
if (!$orderShop) { |
|
|
if (!$orderShop) { |
|
|
$orderShop = $this->createOrderShop([ |
|
|
$orderShop = $this->createOrderShop([ |