Browse Source

[Backend] Order affichage packProduct

packProduct
Fabien Normand 2 years ago
parent
commit
4df0ab80f3
5 changed files with 15 additions and 3 deletions
  1. +1
    -1
      Model/Product/ProductFamilyModel.php
  2. +1
    -1
      Repository/MerchantStoreTrait.php
  3. +1
    -1
      Repository/Order/OrderShopStore.php
  4. +10
    -0
      Repository/Product/ProductRepositoryQuery.php
  5. +2
    -0
      Repository/StoreTrait.php

+ 1
- 1
Model/Product/ProductFamilyModel.php View File

protected $image; protected $image;


/** /**
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\QualityLabelInterface", fetch="EAGER")
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\QualityLabelInterface", fetch="LAZY")
*/ */
protected $qualityLabels; protected $qualityLabels;



+ 1
- 1
Repository/MerchantStoreTrait.php View File



public function addFilterByMerchantViaSectionRequired(RepositoryQueryInterface $query): StoreInterface public function addFilterByMerchantViaSectionRequired(RepositoryQueryInterface $query): StoreInterface
{ {
$this->addFilterByMerchantOptionnal($query);
$this->addFilterByMerchantViaSectionOptionnal($query);


if(!$this->isMerchantDefined()) { if(!$this->isMerchantDefined()) {
throw new \ErrorException('Le Merchant doit être définie dans '.get_class($this)); throw new \ErrorException('Le Merchant doit être définie dans '.get_class($this));

+ 1
- 1
Repository/Order/OrderShopStore.php View File

->groupBy('distribution.cycleNumber, product.id'); ->groupBy('distribution.cycleNumber, product.id');


//TODO vérifier ou est utilisé cette fonction ??? //TODO vérifier ou est utilisé cette fonction ???
dump($query->find());
return $query->find(); return $query->find();
} }



+ 10
- 0
Repository/Product/ProductRepositoryQuery.php View File

return $this; return $this;
} }



public function filterBySection(SectionInterface $section): self public function filterBySection(SectionInterface $section): self
{ {
$this->joinProductFamilySectionProperties(false); $this->joinProductFamilySectionProperties(false);
return $this; return $this;
} }


public function filterIsOnlineAndOffline(): self
{
$this->joinProductFamily();
$this->andWhere('productFamily.status >= 0');
$this->andWhere('.status >=0');
return $this;
}


public function filterIsOnSale(): self public function filterIsOnSale(): self
{ {
$this->joinProductFamily(); $this->joinProductFamily();

+ 2
- 0
Repository/StoreTrait.php View File

} }
return $this; return $this;
} }


} }

Loading…
Cancel
Save