public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Account_customer');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopUserAccount::className();
     parent::init();
 }
Пример #2
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Payment systems');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopPaySystem::className();
     parent::init();
 }
Пример #3
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Content settings');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopContent::className();
     parent::init();
 }
Пример #4
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Discount goods');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopDiscount::className();
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Order statuses');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopOrderStatus::className();
     parent::init();
 }
Пример #6
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'List of taxes');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopTax::className();
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Control of properties payer');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopPersonTypeProperty::className();
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Pyramid');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopAffiliateTier::className();
     parent::init();
 }
Пример #9
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Tax rates');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopTaxRate::className();
     parent::init();
 }
Пример #10
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Surcharges');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopExtra::className();
     parent::init();
 }
Пример #11
0
    /**
     * @inheritdoc
     */
    public function actions()
    {
        return ArrayHelper::merge(parent::actions(), ['index' => ["columns" => [['class' => CreatedAtColumn::className()], 'id', ['class' => DataColumn::className(), 'attribute' => 'status_code', 'format' => 'raw', 'filter' => ArrayHelper::map(ShopOrderStatus::find()->all(), 'code', 'name'), 'value' => function (ShopOrder $order) {
            return Html::label($order->status->name, null, ['style' => "background: {$order->status->color}", 'class' => "label"]) . "<br />" . Html::tag("small", \Yii::$app->formatter->asDatetime($order->status_at) . " (" . \Yii::$app->formatter->asRelativeTime($order->status_at) . ")");
        }], ['class' => BooleanColumn::className(), 'attribute' => 'payed', 'format' => 'raw'], ['class' => DataColumn::className(), 'attribute' => "canceled", 'format' => "raw", 'filter' => ['Y' => \Yii::t('app', 'Yes'), 'N' => \Yii::t('app', 'No')], 'value' => function (ShopOrder $shopOrder) {
            return $shopOrder->canceled == "Y" ? \Yii::t('app', 'Yes') : \Yii::t('app', 'No');
        }], ['class' => DataColumn::className(), 'attribute' => "user_id", 'label' => \skeeks\cms\shop\Module::t('app', 'Buyer'), 'format' => "raw", 'value' => function (ShopOrder $shopOrder) {
            return (new \skeeks\cms\shop\widgets\AdminBuyerUserWidget(['user' => $shopOrder->user]))->run();
        }], ['class' => DataColumn::className(), 'filter' => false, 'format' => 'raw', 'label' => \skeeks\cms\shop\Module::t('app', 'Good'), 'value' => function (ShopOrder $model) {
            if ($model->shopBaskets) {
                $result = [];
                foreach ($model->shopBaskets as $shopBasket) {
                    $money = \Yii::$app->money->intlFormatter()->format($shopBasket->money);
                    $result[] = Html::a($shopBasket->name, $shopBasket->product->cmsContentElement->url, ['target' => '_blank']) . <<<HTML
  — {$shopBasket->quantity} {$shopBasket->measure_name}
HTML;
                }
                return implode('<hr style="margin: 0px;"/>', $result);
            }
        }], ['class' => DataColumn::className(), 'format' => 'raw', 'attribute' => 'price', 'label' => \skeeks\cms\shop\Module::t('app', 'Sum'), 'value' => function (ShopOrder $model) {
            return \Yii::$app->money->intlFormatter()->format($model->money);
        }], ['class' => DataColumn::className(), 'filter' => ArrayHelper::map(CmsSite::find()->active()->all(), 'id', 'name'), 'attribute' => 'site_id', 'format' => 'raw', 'visible' => false, 'label' => \skeeks\cms\shop\Module::t('app', 'Site'), 'value' => function (ShopOrder $model) {
            return $model->site->name . " [{$model->site->code}]";
        }]]], "view" => ['class' => AdminOneModelEditAction::className(), "name" => \Yii::t('app', "Информация"), "icon" => "glyphicon glyphicon-eye-open", "priority" => 5, "callback" => [$this, 'view']]]);
    }
Пример #12
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Types of payers');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopPersonType::className();
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Plans affiliate commissions');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopAffiliatePlan::className();
     parent::init();
 }
Пример #14
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Delivery services');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopDelivery::className();
     parent::init();
 }
Пример #15
0
 public function actionInvoice()
 {
     $model = new Invoice();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         /** @var \robokassa\Merchant $merchant */
         $merchant = Yii::$app->get('robokassa');
         return $merchant->payment($model->sum, $model->id, \skeeks\cms\shop\Module::t('app', 'Refill'), null, Yii::$app->user->identity->email);
     } else {
         return $this->render('invoice', ['model' => $model]);
     }
 }
 public function run()
 {
     /**
      * @var $contentElement CmsContentElement
      */
     $contentElement = $this->controller->model;
     $model = ShopProduct::find()->where(['id' => $contentElement->id])->one();
     $productPrices = [];
     if (!$model) {
         $model = new ShopProduct(['id' => $contentElement->id]);
     } else {
         if ($typePrices = ShopTypePrice::find()->where(['!=', 'def', Cms::BOOL_Y])->all()) {
             foreach ($typePrices as $typePrice) {
                 $productPrice = ShopProductPrice::find()->where(['product_id' => $model->id, 'type_price_id' => $typePrice->id])->one();
                 if (!$productPrice) {
                     $productPrice = new ShopProductPrice(['product_id' => $model->id, 'type_price_id' => $typePrice->id]);
                 }
                 if ($post = \Yii::$app->request->post()) {
                     $data = ArrayHelper::getValue($post, 'prices.' . $typePrice->id);
                     $productPrice->load($data, "");
                 }
                 $productPrices[] = $productPrice;
             }
         }
     }
     $rr = new RequestResponse();
     if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
         return $rr->ajaxValidateForm($model);
     }
     if ($rr->isRequestPjaxPost()) {
         /**
          * @var $productPrice ShopProductPrice
          */
         foreach ($productPrices as $productPrice) {
             if ($productPrice->save()) {
             } else {
                 \Yii::$app->getSession()->setFlash('error', \skeeks\cms\shop\Module::t('app', 'Check the correctness of the prices'));
             }
         }
         if ($model->load(\Yii::$app->request->post()) && $model->save()) {
             \Yii::$app->getSession()->setFlash('success', 'Saved');
             if (\Yii::$app->request->post('submit-btn') == 'apply') {
             } else {
                 return $this->controller->redirect($this->controller->indexUrl);
             }
             $model->refresh();
         } else {
             \Yii::$app->getSession()->setFlash('error', \skeeks\cms\shop\Module::t('app', 'Failed to save'));
         }
     }
     $this->viewParams = ['model' => $model, 'productPrices' => $productPrices];
     return parent::run();
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['create' => ['visible' => false], 'update' => ['visible' => false], 'system' => ['visible' => false], 'index' => ["columns" => [['class' => CreatedAtColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Date views')], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'User'), 'value' => function (ShopViewedProduct $shopViewedProduct) {
         if ($shopViewedProduct->shopFuser->user) {
             return $shopViewedProduct->shopFuser->user->displayName;
         }
         return \skeeks\cms\shop\Module::t('app', 'Not authorized') . " [{$shopViewedProduct->shopFuser->id}]";
     }], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Good'), 'value' => function (ShopViewedProduct $shopViewedProduct) {
         if ($shopViewedProduct->shopProduct) {
             return $shopViewedProduct->shopProduct->cmsContentElement->name;
         }
         return null;
     }]]]]);
 }
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ["dataProviderCallback" => function (ActiveDataProvider $dataProvider) {
         $query = $dataProvider->query;
         /**
          * @var ActiveQuery $query
          */
         //$query->select(['app_company.*', 'count(`app_company_officer_user`.`id`) as countOfficer']);
         $query->with('image');
         $query->with('cmsTree');
         $query->with('cmsContentElementTrees');
         $query->with('cmsContentElementTrees.tree');
     }], 'settings' => ['class' => AdminModelEditorAction::className(), 'name' => \skeeks\cms\shop\Module::t('app', 'Settings'), "icon" => "glyphicon glyphicon-cog"], "activate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \skeeks\cms\shop\Module::t('app', 'Activate'), "eachCallback" => [$this, 'eachMultiActivate']], "inActivate-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \skeeks\cms\shop\Module::t('app', 'Deactivate'), "eachCallback" => [$this, 'eachMultiInActivate']], "change-tree-multi" => ['class' => AdminMultiDialogModelEditAction::className(), "name" => \skeeks\cms\shop\Module::t('app', 'The main section'), "viewDialog" => "@skeeks/cms/views/admin-cms-content-element/change-tree-form", "eachCallback" => [\Yii::$app->createController('/cms/admin-cms-content-element')[0], 'eachMultiChangeTree']], "change-trees-multi" => ['class' => AdminMultiDialogModelEditAction::className(), "name" => \skeeks\cms\shop\Module::t('app', 'Related topics'), "viewDialog" => "@skeeks/cms/views/admin-cms-content-element/change-trees-form", "eachCallback" => [\Yii::$app->createController('/cms/admin-cms-content-element')[0], 'eachMultiChangeTrees']]]);
 }
Пример #19
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ["dataProviderCallback" => function (ActiveDataProvider $dataProvider) {
         $query = $dataProvider->query;
         /**
          * @var \yii\db\ActiveQuery $query
          */
         //$query->select(['app_company.*', 'count(`app_company_officer_user`.`id`) as countOfficer']);
         $query->groupBy([CmsUser::tableName() . '.id']);
         $query->innerJoin(ShopBuyer::tableName(), '`shop_buyer`.`cms_user_id` = `cms_user`.`id`');
     }, "columns" => [['class' => UserColumnData::className(), 'attribute' => 'id', 'label' => \skeeks\cms\shop\Module::t('app', 'Buyer')], 'email', 'phone', ['class' => DateTimeColumnData::className(), 'attribute' => 'created_at', 'label' => \skeeks\cms\shop\Module::t('app', 'Date of registration')], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'Date of last order'), 'value' => function (CmsUser $model) {
         if ($order = ShopOrder::find()->where(['user_id' => $model->id])->orderBy(['created_at' => SORT_DESC])->one()) {
             return \Yii::$app->formatter->asDatetime($order->created_at);
         }
         return null;
     }], ['class' => DataColumn::className(), 'label' => \skeeks\cms\shop\Module::t('app', 'The amount paid orders'), 'value' => function (CmsUser $model) {
         return ShopOrder::find()->where(['user_id' => $model->id, 'payed' => Cms::BOOL_Y])->count();
     }]]]]);
 }
Пример #20
0
 * @date 27.03.2015
 */
use yii\helpers\Html;
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm;
/* @var $this yii\web\View */
/* @var $model \skeeks\cms\models\WidgetConfig */
$form = ActiveForm::begin();
?>


<?php 
echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Main'));
?>

    <?php 
echo $form->field($model, 'email')->textInput()->hint(\skeeks\cms\shop\Module::t('app', 'Email of sales department'));
?>
    <?php 
echo $form->fieldRadioListBoolean($model, 'payAfterConfirmation');
?>

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

<?php 
echo $form->buttonsCreateOrUpdate($model);
ActiveForm::end();
?>

Пример #21
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return array_merge(parent::attributeLabels(), ['id' => \skeeks\cms\shop\Module::t('app', 'ID'), 'created_by' => \skeeks\cms\shop\Module::t('app', 'Created By'), 'updated_by' => \skeeks\cms\shop\Module::t('app', 'Updated By'), 'created_at' => \skeeks\cms\shop\Module::t('app', 'Created At'), 'updated_at' => \skeeks\cms\shop\Module::t('app', 'Updated At'), 'tax_id' => \skeeks\cms\shop\Module::t('app', 'Income tax'), 'person_type_id' => \skeeks\cms\shop\Module::t('app', 'Payer'), 'value' => \skeeks\cms\shop\Module::t('app', 'Value'), 'currency' => \skeeks\cms\shop\Module::t('app', 'Currency'), 'is_percent' => \skeeks\cms\shop\Module::t('app', 'Is Percent'), 'is_in_price' => \skeeks\cms\shop\Module::t('app', 'Included in the price'), 'priority' => \skeeks\cms\shop\Module::t('app', 'The order of application'), 'active' => \skeeks\cms\shop\Module::t('app', 'Active')]);
 }
Пример #22
0
    ?>

            <?php 
    echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => $model->viewPermissionName, 'permissionDescription' => \skeeks\cms\shop\Module::t('app', 'Rights to see the prices') . " '{$model->name}'", 'label' => \skeeks\cms\shop\Module::t('app', 'User Groups that have permission to view this type of price')]);
    ?>

            <?php 
    echo \skeeks\cms\widgets\rbac\PermissionForRoles::widget(['permissionName' => $model->buyPermissionName, 'permissionDescription' => \skeeks\cms\shop\Module::t('app', 'The right to buy at a price') . ": '{$model->name}'", 'label' => \skeeks\cms\shop\Module::t('app', 'Group of users who have the right to purchase on this type of price')]);
    ?>
    <?php 
} else {
    ?>
        <?php 
    \yii\bootstrap\Alert::begin(['options' => ['class' => 'alert-info']]);
    ?>
        <?php 
    echo \skeeks\cms\shop\Module::t('app', 'After saving can be set up to whom this type available price');
    ?>

        <?php 
    \yii\bootstrap\Alert::end();
    ?>

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

<?php 
echo $form->buttonsCreateOrUpdate($model);
ActiveForm::end();
Пример #23
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['pay_system_id' => \skeeks\cms\shop\Module::t('app', 'ID pay system'), 'person_type_id' => \skeeks\cms\shop\Module::t('app', 'ID of person')];
 }
Пример #24
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ArrayHelper::merge(parent::actions(), ['index' => ["gridConfig" => ['settingsData' => ['order' => SORT_ASC, 'orderBy' => "priority"]], "columns" => ['code', 'name', 'priority', ['class' => \skeeks\cms\grid\BooleanColumn::className(), 'attribute' => "def"]]], "def-multi" => ['class' => AdminMultiModelEditAction::className(), "name" => \skeeks\cms\shop\Module::t('app', 'Default'), "eachCallback" => [$this, 'eachMultiDef'], "priority" => 0]]);
 }
Пример #25
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => \skeeks\cms\shop\Module::t('app', 'ID'), 'created_by' => \skeeks\cms\shop\Module::t('app', 'Created By'), 'updated_by' => \skeeks\cms\shop\Module::t('app', 'Updated By'), 'created_at' => \skeeks\cms\shop\Module::t('app', 'Created At'), 'updated_at' => \skeeks\cms\shop\Module::t('app', 'Updated At'), 'site_code' => \skeeks\cms\shop\Module::t('app', 'Site'), 'rate1' => \skeeks\cms\shop\Module::t('app', 'Commission affiliate Level 1'), 'rate2' => \skeeks\cms\shop\Module::t('app', 'Commission affiliate Level 2'), 'rate3' => \skeeks\cms\shop\Module::t('app', 'Commission affiliate Level 3'), 'rate4' => \skeeks\cms\shop\Module::t('app', 'Commission affiliate Level 4'), 'rate5' => \skeeks\cms\shop\Module::t('app', 'Commission affiliate Level 5')];
 }
Пример #26
0
 */
function shopProductsMenu()
{
    $result = [];
    try {
        $table = \skeeks\cms\models\CmsContent::getTableSchema();
        $table = \skeeks\cms\shop\models\ShopContent::getTableSchema();
    } catch (\Exception $e) {
        return $result;
    }
    if ($contents = \skeeks\cms\models\CmsContent::find()->orderBy("priority ASC")->andWhere(['id' => \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopContent::find()->all(), 'content_id', 'content_id')])->all()) {
        /**
         * @var $content \skeeks\cms\models\CmsContent
         */
        foreach ($contents as $content) {
            $itemData = ['label' => $content->name, "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/icon.article.png'], 'url' => ["shop/admin-cms-content-element/index", "content_id" => $content->id]];
            $result[] = new \skeeks\cms\modules\admin\helpers\AdminMenuItemCmsConent($itemData);
        }
    }
    return $result;
}
return ['shop' => ['label' => \skeeks\cms\shop\Module::t('app', 'Shop'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/buyers.png'], 'items' => [['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Orders'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/orders.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Orders'), "url" => ["shop/admin-order"], "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/orders.png']]]], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Goods'), "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/icon.article.png'], 'items' => shopProductsMenu()], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Buyers'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/buyers.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Buyers'), "url" => ["shop/admin-buyer-user"], "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/buyers.png']], ["label" => \skeeks\cms\shop\Module::t('app', 'Accounts'), "url" => ["shop/admin-user-account"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Baskets'), "url" => ["shop/admin-fuser"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Viewed products'), "url" => ["shop/admin-viewed-product"]]]], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Marketing management'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/marketing.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Discount goods'), 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Discount goods'), "url" => ["shop/admin-discount"]]]], ["label" => \skeeks\cms\shop\Module::t('app', 'Cumulative discounts'), "url" => ["shop/admin-discsave"]]]], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Inventory control'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/store.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Stocks'), "url" => ["shop/admin-store"], "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/store.png']]]], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Reports'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/reports.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Reports on orders'), "url" => ["shop/admin-report-order"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Goods'), "url" => ["shop/admin-store"]]]], ["label" => \skeeks\cms\shop\Module::t('app', 'Settings'), "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/settings.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Main settings'), "url" => ["cms/admin-settings", "component" => 'skeeks\\cms\\shop\\components\\ShopComponent'], "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/settings.png'], "activeCallback" => function (\skeeks\cms\modules\admin\helpers\AdminMenuItem $adminMenuItem) {
    return (bool) (\Yii::$app->request->getUrl() == $adminMenuItem->getUrl());
}], ["label" => \skeeks\cms\shop\Module::t('app', 'Content settings'), "url" => ["shop/admin-content"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Updates'), "url" => ["shop/admin-order-status"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Types of prices'), "url" => ["shop/admin-type-price"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Types of payers'), "url" => ["shop/admin-person-type"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Payment systems'), "url" => ["shop/admin-pay-system"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Delivery services'), "url" => ["shop/admin-delivery"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Taxes'), 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'List of taxes'), "url" => ["shop/admin-tax"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Tax rates'), "url" => ["shop/admin-tax-rate"]], ["label" => \skeeks\cms\shop\Module::t('app', 'VAT rates'), "url" => ["shop/admin-vat"]]]], ["label" => \skeeks\cms\shop\Module::t('app', 'Surcharges'), "url" => ["shop/admin-extra"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Currency'), "img" => ['\\skeeks\\modules\\cms\\money\\assets\\Asset', 'images/money_16_16.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Currency'), "url" => ["money/admin-currency"], "img" => ['\\skeeks\\modules\\cms\\money\\assets\\Asset', 'images/money_16_16.png']], ["label" => \skeeks\cms\shop\Module::t('app', 'Settings'), "url" => ["cms/admin-settings", "component" => 'skeeks\\modules\\cms\\money\\components\\money\\Money'], "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/settings.png'], "activeCallback" => function (\skeeks\cms\modules\admin\helpers\AdminMenuItem $adminMenuItem) {
    return (bool) (\Yii::$app->request->getUrl() == $adminMenuItem->getUrl());
}]]], ["label" => \skeeks\cms\shop\Module::t('app', 'Base of locations'), "img" => ['\\skeeks\\cms\\kladr\\assets\\Asset', 'icons/global.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Base of locations'), "url" => ["kladr/admin-kladr-location"], "img" => ['\\skeeks\\cms\\kladr\\assets\\Asset', 'icons/global.png']], ["label" => \skeeks\cms\shop\Module::t('app', 'Settings'), "url" => ["cms/admin-settings", "component" => 'skeeks\\cms\\kladr\\components\\KladrComponent'], "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/settings.png'], "activeCallback" => function (\skeeks\cms\modules\admin\helpers\AdminMenuItem $adminMenuItem) {
    return (bool) (\Yii::$app->request->getUrl() == $adminMenuItem->getUrl());
}]]], ["label" => \skeeks\cms\shop\Module::t('app', 'Units of measurement'), "img" => ['\\skeeks\\cms\\measure\\assets\\Asset', 'icons/misc.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Units of measurement'), "url" => ["measure/admin-measure"], "img" => ['\\skeeks\\cms\\measure\\assets\\Asset', 'icons/misc.png']], ["label" => \skeeks\cms\shop\Module::t('app', 'Settings'), "url" => ["cms/admin-settings", "component" => 'skeeks\\cms\\measure\\components\\MeasureComponent'], "img" => ['\\skeeks\\cms\\modules\\admin\\assets\\AdminAsset', 'images/icons/settings.png'], "activeCallback" => function (\skeeks\cms\modules\admin\helpers\AdminMenuItem $adminMenuItem) {
    return (bool) (\Yii::$app->request->getUrl() == $adminMenuItem->getUrl());
}]]]]], ['priority' => 0, 'label' => \skeeks\cms\shop\Module::t('app', 'Affiliates'), "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/affiliate.png'], 'items' => [["label" => \skeeks\cms\shop\Module::t('app', 'Affiliates'), "url" => ["shop/admin-affiliate"], "img" => ['\\skeeks\\cms\\shop\\assets\\Asset', 'icons/affiliate.png']], ["label" => \skeeks\cms\shop\Module::t('app', 'Plans of Commission'), "url" => ["shop/admin-affiliate-plan"]], ["label" => \skeeks\cms\shop\Module::t('app', 'Pyramid'), "url" => ["shop/admin-affiliate-tier"]]]]]]];
Пример #27
0
 * @author Semenov Alexander <*****@*****.**>
 * @link http://skeeks.com/
 * @copyright 2010 SkeekS (СкикС)
 * @date 28.08.2015
 */
use yii\helpers\Html;
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm;
/* @var $this yii\web\View */
?>

<?php 
$form = ActiveForm::begin();
?>

<?php 
echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Main'));
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 50]);
?>
    <?php 
echo $form->field($model, 'value')->textInput();
?>

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

<?php 
echo $form->buttonsCreateOrUpdate($model);
Пример #28
0
 public function attributeLabels()
 {
     return ArrayHelper::merge(parent::attributeLabels(), ['email' => 'Email', 'payAfterConfirmation' => \skeeks\cms\shop\Module::t('app', 'Include payment orders only after the manager approval')]);
 }
Пример #29
0
        <div class="row">
            <div class="col-md-8"></div>
            <div class="col-md-4">
                    <div class="sx-result">
                <?php 
$this->registerCss(<<<CSS
.sx-result
{
    background-color: #ecf2d3;
}
CSS
);
?>
                <?php 
echo \yii\widgets\DetailView::widget(['model' => $model, "template" => "<tr><th>{label}</th><td style='text-align: right;'>{value}</td></tr>", "options" => ['class' => 'sx-result-table table detail-view'], 'attributes' => [['label' => \skeeks\cms\shop\Module::t('app', 'The total value of the goods'), 'value' => \Yii::$app->money->intlFormatter()->format($model->moneyOriginal)], ['label' => \skeeks\cms\shop\Module::t('app', 'Discount, margin'), 'value' => \Yii::$app->money->intlFormatter()->format($model->moneyDiscount)], ['label' => \skeeks\cms\shop\Module::t('app', 'Delivery service'), 'value' => \Yii::$app->money->intlFormatter()->format($model->moneyDelivery)], ['label' => \skeeks\cms\shop\Module::t('app', 'Taxe'), 'value' => \Yii::$app->money->intlFormatter()->format($model->moneyVat)], ['label' => \skeeks\cms\shop\Module::t('app', 'Weight (gramm)'), 'value' => $model->weight . " " . \skeeks\cms\shop\Module::t('app', 'g.')], ['label' => \skeeks\cms\shop\Module::t('app', 'Already paid'), 'value' => \Yii::$app->money->intlFormatter()->format($model->moneySummPaid)], ['label' => \skeeks\cms\shop\Module::t('app', 'In total'), 'format' => 'raw', 'value' => Html::tag('b', \Yii::$app->money->intlFormatter()->format($model->money))]]]);
?>
                    </div>
            </div>
        </div>


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



<?php 
echo $form->buttonsCreateOrUpdate($model);
ActiveForm::end();
Пример #30
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return array_merge(parent::attributeLabels(), ['code' => \skeeks\cms\shop\Module::t('app', 'Code'), 'name' => \skeeks\cms\shop\Module::t('app', 'Name'), 'description' => \skeeks\cms\shop\Module::t('app', 'Description'), 'priority' => \skeeks\cms\shop\Module::t('app', 'Priority'), 'def' => \skeeks\cms\shop\Module::t('app', 'Default')]);
 }