Browse Source

Implémentation OrginProduct

feature/export_comptable
Fab 4 years ago
parent
commit
03ccaebf51
2 changed files with 4 additions and 5 deletions
  1. +1
    -2
      ShopBundle/Controller/Backend/ProductFamilyController.php
  2. +3
    -3
      ShopBundle/Model/ProductFamily.php

+ 1
- 2
ShopBundle/Controller/Backend/ProductFamilyController.php View File





} }
dump($sortableProductsField);
ksort($sortableProductsField); ksort($sortableProductsField);


$editForm->handleRequest($this->request); $editForm->handleRequest($this->request);
'entity' => $entity, 'entity' => $entity,
'categories' => $categories, 'categories' => $categories,
'sortableProductsField' => array(), 'sortableProductsField' => array(),
'totalProductOrdered' => array()
'totalProductOrdered' => array('total'=>0)
]; ];


return $this->executeDynamicMethod('render<EntityName>Template', ['new', $this->entity['templates']['new'], $parameters]); return $this->executeDynamicMethod('render<EntityName>Template', ['new', $this->entity['templates']['new'], $parameters]);

+ 3
- 3
ShopBundle/Model/ProductFamily.php View File



case self::BEHAVIOR_COUNT_STOCK_BY_PRODUCT : case self::BEHAVIOR_COUNT_STOCK_BY_PRODUCT :


foreach($this->getProducts() as $product) {
foreach($this->getProductsOnline() as $product) {
$availableQuantity += $product->getAvailableQuantityInherited() ; $availableQuantity += $product->getAvailableQuantityInherited() ;
} }
break ; break ;
{ {
if ($this->getActiveProducts()) { if ($this->getActiveProducts()) {
$arrayCountProducts = []; $arrayCountProducts = [];
$products = $this->getProducts();
$products = $this->getProductsOnline();


foreach ($products as $product) { foreach ($products as $product) {
$titleProduct = $product->getTitleInherited(); $titleProduct = $product->getTitleInherited();
public function getProductsGroupByTitle() public function getProductsGroupByTitle()
{ {
$arrayProductsGroupByTitle = []; $arrayProductsGroupByTitle = [];
$products = $this->getProducts();
$products = $this->getProductsOnline();


foreach ($products as $product) { foreach ($products as $product) {
if($product->getStatus() == 1) { if($product->getStatus() == 1) {

Loading…
Cancel
Save