Browse Source

[Espace producteurs] Problème abonnements

prodstable
Guillaume Bourgeois 1 year ago
parent
commit
df4596c455
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      producer/controllers/SubscriptionController.php

+ 6
- 2
producer/controllers/SubscriptionController.php View File

} }
} }


if ($model->load($posts) && $model->validate()
&& $model->save()) {
if ($model->load($posts)) {

$model->auto_payment = (int) $posts['auto_payment'];

if($model->validate() && $model->save()) {
$subscription = Subscription::searchOne([ $subscription = Subscription::searchOne([
'id' => $model->id 'id' => $model->id
]); ]);
Yii::$app->getSession()->setFlash('success', 'Abonnement ajouté'); Yii::$app->getSession()->setFlash('success', 'Abonnement ajouté');
} }
} }
}
} }


/** /**

Loading…
Cancel
Save