Esempio n. 1
0
 */
$allowToAddSameProduct = 0;
/**
 * @var bool Count only unique products in the order
 */
$countUniqueProductsOnly = 1;
/**
 * @var bool Count children products in the order
 */
$countChildrenProducts = 1;
/**
 * @var int Default measure ID
 */
$defaultMeasureId = 1;
?>
</div>

<div>
    <div class="col-md-6 col-sm-12">
        <?php 
BackendWidget::begin(['icon' => 'cogs', 'title' => Yii::t('app', 'Order stage system'), 'options' => ['class' => 'visible-header']]);
?>
        <?php 
echo $form->field($model, 'finalOrderStageLeaf')->dropDownList(\app\components\Helper::getModelMap(\app\modules\shop\models\OrderStageLeaf::className(), 'id', 'button_label'));
?>
        <?php 
BackendWidget::end();
?>
    </div>

</div>
 public function actionLeafDelete($id)
 {
     if (Yii::$app->request->isPost === false) {
         throw new yii\web\BadRequestHttpException();
     }
     if ($id === null) {
         throw new yii\web\BadRequestHttpException();
     }
     /** @var OrderStageLeaf $model */
     $model = $this->loadModel(OrderStageLeaf::className(), $id);
     $model->delete();
     Yii::$app->session->setFlash('info', Yii::t('app', 'Leaf successfully deleted. Check your stages and leafs for correct workflow!'));
     return $this->redirect('leaf-index');
 }
Esempio n. 3
0
 /**
  * @return OrderStageLeaf[]
  */
 public function getPrevLeafs()
 {
     return $this->hasMany(OrderStageLeaf::className(), ['stage_to_id' => 'id'])->addOrderBy(['sort_order' => SORT_ASC, 'id' => SORT_ASC]);
 }