Browse Source

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Guillaume 2 years ago
parent
commit
0ecd9841dd
6 changed files with 25 additions and 3 deletions
  1. +1
    -1
      Controller/AbstractController.php
  2. +2
    -0
      Controller/ControllerTrait.php
  3. +4
    -0
      Generator/OrderReferenceGenerator.php
  4. +1
    -0
      Repository/Distribution/DistributionStore.php
  5. +4
    -1
      Resources/views/admin/product/field/product_family_sales.html.twig
  6. +13
    -1
      Solver/Merchant/MerchantSolver.php

+ 1
- 1
Controller/AbstractController.php View File

@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Controller;

use Lc\SovBundle\Controller\AbstractController as SovAbstractController;

class AbstractController extends SovAbstractController
abstract class AbstractController extends SovAbstractController
{
use ControllerTrait;
}

+ 2
- 0
Controller/ControllerTrait.php View File

@@ -6,6 +6,7 @@ use Lc\CaracoleBundle\Container\Address\AddressContainer;
use Lc\CaracoleBundle\Container\Config\TaxRateContainer;
use Lc\CaracoleBundle\Container\Config\UnitContainer;
use Lc\CaracoleBundle\Container\Credit\CreditHistoryContainer;
use Lc\CaracoleBundle\Container\Distribution\DistributionContainer;
use Lc\CaracoleBundle\Container\File\DocumentContainer;
use Lc\CaracoleBundle\Container\Merchant\MerchantContainer;
use Lc\CaracoleBundle\Container\Order\OrderPaymentContainer;
@@ -85,6 +86,7 @@ trait ControllerTrait
UserMerchantContainer::class => UserMerchantContainer::class,
UserPointSaleContainer::class => UserPointSaleContainer::class,
VisitorContainer::class => VisitorContainer::class,
DistributionContainer::class => DistributionContainer::class,
]
);
}

+ 4
- 0
Generator/OrderReferenceGenerator.php View File

@@ -78,3 +78,7 @@ class OrderReferenceGenerator
}

}





+ 1
- 0
Repository/Distribution/DistributionStore.php View File

@@ -48,4 +48,5 @@ class DistributionStore extends AbstractStore

return $query->findOne();
}

}

+ 4
- 1
Resources/views/admin/product/field/product_family_sales.html.twig View File

@@ -1,3 +1,6 @@
{% import '@LcCaracole/admin/product/macro/product_family_macro.html.twig' as pfm %}
{% set section_current = section_container.resolver.getCurrent() %}
{{ pfm.product_family_sales_statistic(order_shop_container.builder.getProductsSalesStatistic(section_current, entity.instance, 2), entity.instance) }}
{% set distribution = distribution_container.builder.guessCurrentDistributionDelivery(section_current) %}

{#
{{ pfm.product_family_sales_statistic(order_shop_container.builder.getProductsSalesStatistic(section_current, entity.instance, 2), entity.instance) }}#}

+ 13
- 1
Solver/Merchant/MerchantSolver.php View File

@@ -18,4 +18,16 @@ class MerchantSolver

return $newsletterArray;
}
}

public function getSectionsOnline(MerchantInterface $merchant):array{
$sectionArray = [];

foreach($merchant->getSections() as $section) {
if($section->getStatus() === 1){
$sectionArray[] = $section;
}
}

return $sectionArray;
}
}

Loading…
Cancel
Save