瀏覽代碼

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

packProduct
Guillaume 3 年之前
父節點
當前提交
3b51a4689b
共有 4 個文件被更改,包括 63 次插入4 次删除
  1. +21
    -0
      Controller/Reduction/ReductionCartAdminController.php
  2. +21
    -0
      Controller/Reduction/ReductionCatalogAdminController.php
  3. +13
    -4
      Model/Reduction/ReductionCartModel.php
  4. +8
    -0
      Twig/StoreTwigExtension.php

+ 21
- 0
Controller/Reduction/ReductionCartAdminController.php 查看文件

@@ -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 查看文件

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



}

+ 13
- 4
Model/Reduction/ReductionCartModel.php 查看文件

@@ -31,10 +31,6 @@ abstract class ReductionCartModel extends AbstractLightEntity implements Reducti
FilterSectionInterface,
OrderAmountMinInterface, StatusInterface
{

const APPLIED_TO_DELIVERY = 'delivery';
const APPLIED_TO_ORDER_PRODUCTS = 'order-products';

use StatusTrait;
use OrderAmountMinTrait;
use ReductionTrait;
@@ -43,6 +39,19 @@ abstract class ReductionCartModel extends AbstractLightEntity implements Reducti
ReductionPropertyTrait::__construct as private __reductionPropertyConstruct;
}

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,
];
}


/**
* @ORM\Column(type="string", length=255)
*/

+ 8
- 0
Twig/StoreTwigExtension.php 查看文件

@@ -53,6 +53,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->setMerchant($this->merchantResolver->getCurrent())->getAsArray();
}

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


}

Loading…
取消
儲存