Quellcode durchsuchen

Pages commandes

feature/export_comptable
Fab vor 4 Jahren
Ursprung
Commit
a716b18604
3 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. +3
    -1
      ShopBundle/Form/Backend/ReductionCommon/UnitType.php
  2. +2
    -0
      ShopBundle/Model/ReductionCredit.php
  3. +1
    -1
      ShopBundle/Resources/views/backend/reductioncart/panel_actions.html.twig

+ 3
- 1
ShopBundle/Form/Backend/ReductionCommon/UnitType.php Datei anzeigen

@@ -21,13 +21,15 @@ class UnitType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
dump($options);
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event, $options) {
$builder = $event->getForm()->getParent();

$builder->add('unit', ChoiceType::class, [
'required' => true,
'translation_domain'=>'lcshop',
'expanded'=>true,
'data'=> $options['data'],
'choices' => [
'field.default.percent' => 'percent',
'field.default.amount' => 'amount'

+ 2
- 0
ShopBundle/Model/ReductionCredit.php Datei anzeigen

@@ -36,9 +36,11 @@ abstract class ReductionCredit extends AbstractEntity implements ReductionInterf
protected $merchant;



public function __construct()
{
$this->users = new ArrayCollection();
$this->unit = 'amount';
}

public function __toString()

+ 1
- 1
ShopBundle/Resources/views/backend/reductioncart/panel_actions.html.twig Datei anzeigen

@@ -8,7 +8,7 @@
<div class="col-12">
{{ form_row(form.appliedTo, {"attr" :{"v-model" : 'reductionAppliedTo'}}) }}
</div>
<div class="col-12" v-show="reductionAppliedTo != 'shipping'">
<div class="col-12" v-show="reductionAppliedTo != 'delivery'">
{{ form_row(form.freeShipping) }}
</div>
{{ macros.fieldReductionUnit(form) }}

Laden…
Abbrechen
Speichern