Przeglądaj źródła

Intégration app reduction

packProduct
Fab 3 lat temu
rodzic
commit
f4b70e0ec7
4 zmienionych plików z 57 dodań i 0 usunięć
  1. +21
    -0
      Controller/Reduction/ReductionCartAdminController.php
  2. +21
    -0
      Controller/Reduction/ReductionCatalogAdminController.php
  3. +7
    -0
      Model/Reduction/ReductionCartModel.php
  4. +8
    -0
      Twig/StoreTwigExtension.php

+ 21
- 0
Controller/Reduction/ReductionCartAdminController.php Wyświetl plik

@@ -0,0 +1,21 @@
<?php

namespace Lc\CaracoleBundle\Controller\Reduction;


use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\CaracoleBundle\Model\Config\TaxRateModel;
use Lc\CaracoleBundle\Model\Config\UnitModel;
use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\SovBundle\Translation\TranslatorAdmin;

abstract class ReductionCartAdminController extends AbstractAdminController
{
use AdminControllerTrait;



}

+ 21
- 0
Controller/Reduction/ReductionCatalogAdminController.php Wyświetl plik

@@ -0,0 +1,21 @@
<?php

namespace Lc\CaracoleBundle\Controller\Reduction;


use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\CaracoleBundle\Model\Config\TaxRateModel;
use Lc\CaracoleBundle\Model\Config\UnitModel;
use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\SovBundle\Translation\TranslatorAdmin;

abstract class ReductionCatalogAdminController extends AbstractAdminController
{
use AdminControllerTrait;



}

+ 7
- 0
Model/Reduction/ReductionCartModel.php Wyświetl plik

@@ -35,6 +35,13 @@ abstract class ReductionCartModel extends AbstractLightEntity implements Reducti
const APPLIED_TO_DELIVERY = 'delivery';
const APPLIED_TO_ORDER_PRODUCTS = 'order-products';

public function getAppliedToChoices()
{
return [
self::APPLIED_TO_DELIVERY,
self::APPLIED_TO_ORDER_PRODUCTS,
];
}

use StatusTrait;
use OrderAmountMinTrait;

+ 8
- 0
Twig/StoreTwigExtension.php Wyświetl plik

@@ -51,6 +51,7 @@ class StoreTwigExtension extends AbstractExtension
new TwigFunction('carac_reminders', [$this, 'getReminders']),
new TwigFunction('carac_units', [$this, 'getUnits']),
new TwigFunction('carac_tax_rates', [$this, 'getTaxRates']),
new TwigFunction('carac_reduction_cart_codes', [$this, 'getTaxRates']),
);
}

@@ -84,4 +85,11 @@ class StoreTwigExtension extends AbstractExtension
return $this->taxRateStore->getAsArray();
}

public function getReductionCartCodes()
{
//TODO mettre à jour une fois les repo fait
return array();
}


}

Ładowanie…
Anuluj
Zapisz