public function init()
 {
     $this->name = \Yii::t('skeeks/shop/app', 'Payment systems');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopPaySystem::className();
     parent::init();
 }
Ejemplo n.º 2
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Payment systems');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopPaySystem::className();
     parent::init();
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPaySystem()
 {
     return $this->hasOne(ShopPaySystem::className(), ['id' => 'pay_system_id']);
 }
Ejemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPaySystems()
 {
     return $this->hasMany(ShopPaySystem::className(), ['id' => 'pay_system_id'])->viaTable('shop_pay_system_person_type', ['person_type_id' => 'id']);
 }
Ejemplo n.º 5
0
 /**
  * Доступные платежные системы
  *
  * @return ShopPaySystem[]
  */
 public function getPaySystems()
 {
     return $this->personType->getPaySystems()->andWhere([ShopPaySystem::tableName() . ".active" => Cms::BOOL_Y]);
 }
Ejemplo n.º 6
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getShopPaySystems()
 {
     return $this->hasMany(ShopPaySystem::className(), ['id' => 'pay_system_id'])->viaTable('shop_delivery2pay_system', ['delivery_id' => 'id']);
 }
Ejemplo n.º 7
0
    </div>

    <div class="row">

        <div class="col-md-8">
            <?php 
echo $form->field($model, 'logo_id')->widget(\skeeks\cms\widgets\formInputs\StorageImage::className());
?>
        </div>

    </div>



<?php 
echo $form->fieldSetEnd();
echo $form->fieldSet(\Yii::t('skeeks/shop/app', 'Payment systems'));
?>

    <?php 
echo $form->field($model, 'shopPaySystems')->checkboxList(\yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopPaySystem::find()->active()->all(), 'id', 'name'))->hint(\Yii::t('skeeks/shop/app', 'if nothing is selected, it means all'));
?>

<?php 
echo $form->fieldSetEnd();
?>

<?php 
echo $form->buttonsCreateOrUpdate($model);
ActiveForm::end();
Ejemplo n.º 8
0
 /**
  * Доступные платежные системы
  *
  * @return ShopPaySystem[]
  */
 public function getPaySystems()
 {
     if (!$this->personType) {
         $query = ShopPaySystem::find()->andWhere([ShopPaySystem::tableName() . ".active" => Cms::BOOL_Y]);
         $query->multiple = true;
         return $query;
     }
     return $this->personType->getPaySystems()->andWhere([ShopPaySystem::tableName() . ".active" => Cms::BOOL_Y]);
 }