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

@@ -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;


+ 1
- 1
Repository/MerchantStoreTrait.php View File

@@ -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));

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

@@ -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();
}


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

@@ -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();

+ 2
- 0
Repository/StoreTrait.php View File

@@ -15,4 +15,6 @@ trait StoreTrait
}
return $this;
}


}

Loading…
Cancel
Save