Browse Source

Compatibilité frontend : adaptations

reduction
Guillaume 4 years ago
parent
commit
a2fa505810
3 changed files with 3 additions and 4 deletions
  1. +1
    -1
      ShopBundle/Controller/Admin/ProductFamilyController.php
  2. +1
    -2
      ShopBundle/Model/ProductFamily.php
  3. +1
    -1
      ShopBundle/Resources/translations/lcshop.fr.yaml

+ 1
- 1
ShopBundle/Controller/Admin/ProductFamilyController.php View File



$formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( $formBuilder->add('propertyOrganicLabel', ChoiceType::class, array(
'choices' => array( 'choices' => array(
'field.ProductFamily.organicLabelOptions.bio' => 'by-quantity',
'field.ProductFamily.organicLabelOptions.ab' => 'ab',
'field.ProductFamily.organicLabelOptions.natureProgres' => 'nature-progres', 'field.ProductFamily.organicLabelOptions.natureProgres' => 'nature-progres',
'field.ProductFamily.organicLabelOptions.hVE' => 'hve' 'field.ProductFamily.organicLabelOptions.hVE' => 'hve'
), ),

+ 1
- 2
ShopBundle/Model/ProductFamily.php View File



public function isPropertyNoveltyOnline(): ?bool public function isPropertyNoveltyOnline(): ?bool
{ {

if($this->getPropertyNoveltyExpirationDate()) { if($this->getPropertyNoveltyExpirationDate()) {
$now = new \DateTime() ; $now = new \DateTime() ;
if($now <= $this->getNoveltyExpirationDate()) {
if($now <= $this->getPropertyNoveltyExpirationDate()) {
return true ; return true ;
} }
} }

+ 1
- 1
ShopBundle/Resources/translations/lcshop.fr.yaml View File

byProductFamily: Gérer le stock par produit (à l'unité) byProductFamily: Gérer le stock par produit (à l'unité)
byProduct: Gérer le stock par déclainaison byProduct: Gérer le stock par déclainaison
organicLabelOptions: organicLabelOptions:
bio: Agriculture biologique
ab: Agriculture biologique
hVE: Haute valeur environnementale hVE: Haute valeur environnementale
natureProgres: Nature & progrès natureProgres: Nature & progrès
behaviorExpirationDate: Gèrer behaviorExpirationDate: Gèrer

Loading…
Cancel
Save