@@ -250,7 +250,7 @@ abstract class ProductFamilyModel extends AbstractFullEntity implements ProductP | |||
protected $image; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\QualityLabelInterface", fetch="EAGER") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\QualityLabelInterface", fetch="LAZY") | |||
*/ | |||
protected $qualityLabels; | |||
@@ -53,7 +53,7 @@ trait MerchantStoreTrait | |||
public function addFilterByMerchantViaSectionRequired(RepositoryQueryInterface $query): StoreInterface | |||
{ | |||
$this->addFilterByMerchantOptionnal($query); | |||
$this->addFilterByMerchantViaSectionOptionnal($query); | |||
if(!$this->isMerchantDefined()) { | |||
throw new \ErrorException('Le Merchant doit être définie dans '.get_class($this)); |
@@ -603,7 +603,7 @@ class OrderShopStore extends AbstractStore | |||
->groupBy('distribution.cycleNumber, product.id'); | |||
//TODO vérifier ou est utilisé cette fonction ??? | |||
dump($query->find()); | |||
return $query->find(); | |||
} | |||
@@ -38,6 +38,7 @@ class ProductRepositoryQuery extends AbstractRepositoryQuery | |||
return $this; | |||
} | |||
public function filterBySection(SectionInterface $section): self | |||
{ | |||
$this->joinProductFamilySectionProperties(false); | |||
@@ -95,6 +96,15 @@ class ProductRepositoryQuery extends AbstractRepositoryQuery | |||
return $this; | |||
} | |||
public function filterIsOnlineAndOffline(): self | |||
{ | |||
$this->joinProductFamily(); | |||
$this->andWhere('productFamily.status >= 0'); | |||
$this->andWhere('.status >=0'); | |||
return $this; | |||
} | |||
public function filterIsOnSale(): self | |||
{ | |||
$this->joinProductFamily(); |
@@ -15,4 +15,6 @@ trait StoreTrait | |||
} | |||
return $this; | |||
} | |||
} |