Пример #1
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ks_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=' . $this->state->get('extension'));
     $this->path->addItem(JText::_('ks_seo'));
     $this->seo_type = $this->state->get('seo_type');
     switch ($this->getLayout()) {
         case 'seourlvalue':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/seourlvalue.js');
             $this->seourlvalue = $this->get('SeoURLValue');
             $this->title = JText::_('ks_seo_seourlvalue_editor');
             break;
         case 'seotitlevalue':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/seotitlevalue.js');
             $this->seotitlevalue = $this->get('SeoTitleValue');
             $this->title = JText::_('ks_seo_seotitlevalue_editor');
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/seo.js');
             switch ($this->seo_type) {
                 case 'seo-titles-config':
                     $this->configs = $this->get('TitlesConfigs');
                     break;
                 case 'seo-meta-config':
                     $this->configs = $this->get('MetaConfigs');
                     break;
                 case 'seo-urls-config':
                     $this->configs = $this->get('UrlsConfigs');
                     break;
             }
     }
     parent::display($tpl);
 }
Пример #2
0
 public function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_discounts'));
     switch ($this->getLayout()) {
         case 'discount_params':
             $discount = $this->get('Discount');
             $this->state->set('discount_type', JRequest::getVar('type', ''));
             $this->paramsform = $this->get('DiscountParamsForm');
             break;
         case 'discount':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/discount.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.ui.datepicker-ru.js');
             $model = $this->getModel();
             $discount = $model->getDiscount();
             $model->form = 'discount';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($discount);
             }
             $this->title = JText::_('ksm_discounts_discount_editor');
             $this->form = $form;
             $this->paramsform = $this->get('DiscountParamsForm');
         default:
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #3
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_currencies'));
     switch ($this->getLayout()) {
         case 'currency':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/currency.js');
             $model = $this->getModel();
             $currency = $model->getCurrency();
             $model->form = 'currency';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($currency);
             }
             $this->title = JText::_('ksm_currencies_currency_editor');
             $this->form = $form;
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/list.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/listmodule.js');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #4
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_exportimport'));
     $this->type = $this->state->get('type');
     parent::display($tpl);
 }
Пример #5
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_payments'));
     switch ($this->getLayout()) {
         case 'payment_params':
             $payment = $this->get('Payment');
             $this->paramsform = $this->get('PaymentParamsForm');
             break;
         case 'payment':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/payment.js');
             $model = $this->getModel();
             $payment = $model->getPayment();
             $model->form = 'payment';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($payment);
             }
             $this->title = JText::_('ksm_payments_payment_editor');
             $this->form = $form;
             $this->paramsform = $this->get('PaymentParamsForm');
             break;
         default:
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #6
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_shippings'));
     switch ($this->getLayout()) {
         case 'shipping_params':
             $shipping = $this->get('Shipping');
             $this->paramsform = $this->get('ShippingParamsForm');
             break;
         case 'shipping':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/shipping.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.ui.datepicker-ru.js');
             $model = $this->getModel();
             $shipping = $model->getShipping();
             $model->form = 'shipping';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($shipping);
             }
             $this->title = JText::_('ksm_shippings_shipping_editor');
             $this->form = $form;
             $this->paramsform = $this->get('ShippingParamsForm');
         default:
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #7
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ks_users'));
     switch ($this->getLayout()) {
         case 'usergroup':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/usergroup.js');
             $model = $this->getModel();
             $usergroup = $model->getUserGroup();
             $model->form = 'usergroup';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($usergroup);
             }
             $this->title = JText::_('ks_users_usergroup_editor');
             $this->form = $form;
             break;
         case 'userfield':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/userfield.js');
             $model = $this->getModel();
             $userfield = $model->getUserField();
             $model->form = 'userfield';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($userfield);
             }
             $this->title = JText::_('ks_users_userfield_editor');
             $this->form = $form;
             break;
         case 'user':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/user.js');
             $model = $this->getModel();
             $user = $model->getUser();
             $model->form = 'user';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($user);
             }
             $this->title = JText::_('ks_users_user_editor');
             $this->form = $form;
             break;
         case 'search':
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/userssearch.js');
             $this->title = JText::_('ks_users_search');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/users.js');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #8
0
 public function display($tpl = null)
 {
     $widget_type = $this->state->get('widget_type');
     if ($widget_type != 'all') {
         $this->path->addItem(JText::_('ks_' . $widget_type));
     }
     $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/jquery.mousewheel.min.js');
     $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/jquery-ui.js');
     $this->document->addScript(JURI::base() . 'components/com_ksen/assets/js/panel.js');
     $this->widgets_groups = $this->get('Widgets');
     parent::display($tpl);
 }
Пример #9
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ks_callbackkiller'));
     $this->plg_params = $this->get('PlgParams');
     if (empty($this->plg_params->loginhash)) {
         $model = $this->getModel();
         $model->form = 'callbackkiller';
         $this->form = $model->getForm();
     }
     $this->document->addStyleSheet(JURI::root() . 'plugins/system/callbackkiller/assets/css/callbackkiller.css');
     $this->document->addScript(JURI::root() . 'plugins/system/callbackkiller/assets/js/callbackkiller.js');
     parent::display($tpl);
 }
Пример #10
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('KS_SETTINGS'));
     $form = $this->get('Form');
     $component = $this->get('Component');
     foreach ($form as $name => $f) {
         if ($f && $component->params) {
             $form[$name]->bind($component->params);
         }
     }
     $this->form = $form;
     $this->component = $component;
     parent::display($tpl);
 }
Пример #11
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_reports'));
     $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
     $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.ui.datepicker-ru.js');
     $this->report = $this->state->get('report');
     switch ($this->report) {
         case 'favoritesReport':
         case 'watchedReport':
         case 'productsReport':
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
             break;
         case 'ordersReport':
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
             $this->total_cost = $this->get('TotalCost');
             break;
     }
     parent::display($tpl);
 }
Пример #12
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_users'), 'index.php?option=com_ksen&widget_type=users&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_comments'));
     switch ($this->getLayout()) {
         case 'rate':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/rate.js');
             $model = $this->getModel();
             $rate = $model->getRate();
             $model->form = 'rate';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($rate);
             }
             $this->title = JText::_('ksm_comments_rate_editor');
             $this->form = $form;
             break;
         case 'comment':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/comment.js');
             $model = $this->getModel();
             $comment = $model->getComment();
             $model->form = 'comment';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($comment);
             }
             $this->title = JText::_('ksm_comments_comment_editor');
             $this->form = $form;
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/list.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/listmodule.js');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #13
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_orders'));
     switch ($this->getLayout()) {
         case 'consignmentnote':
             $this->document->setTitle(JText::_('ksm_orders_order_consignmentnote'));
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/inline_edit_printform.js');
             $this->document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/printforms.css');
             $this->order = $this->get('Order');
             break;
         case 'invoice':
             $this->document->setTitle(JText::_('ksm_orders_order_invoice'));
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/inline_edit_printform.js');
             $this->order = $this->get('Order');
             break;
         case 'salesinvoice':
             $this->document->setTitle(JText::_('ksm_orders_order_salesinvoice'));
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/inline_edit_printform.js');
             $this->document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/printforms.css');
             $this->order = $this->get('Order');
             break;
         case 'shippingsummary':
             $this->document->setTitle(JText::_('ksm_orders_order_shippingsummary'));
             $this->document->addScript('http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU', 'text/javascript', false);
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/map.js', 'text/javascript', false);
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/map_config.js', 'text/javascript', false);
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/inline_edit_printform.js');
             $this->document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/printforms.css');
             $this->order = $this->get('Order');
             break;
         case 'orderstatus':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/orderstatus.js');
             $model = $this->getModel();
             $orderstatus = $model->getOrderStatus();
             $model->form = 'orderstatus';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($orderstatus);
             }
             $this->title = JText::_('ksm_orders_orderstatus_editor');
             $this->form = $form;
             break;
         case 'order':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/order.js');
             $this->document->addScript('//api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU', 'text/javascript', false);
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/map.js', 'text/javascript', false);
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/map_config.js', 'text/javascript', false);
             $model = $this->getModel();
             $order = $model->getOrder();
             $model->form = 'order';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($order);
             }
             if ($order->id > 0) {
                 $this->title = JText::sprintf('ksm_orders_order_title', $order->id);
             } else {
                 $this->title = JText::_('ksm_orders_new_order_title');
             }
             $this->form = $form;
             $this->order = $order;
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.ui.datepicker-ru.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/orders.js');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #14
0
 function display($tpl = null)
 {
     $this->path->addItem(JText::_('ksm_trade'), 'index.php?option=com_ksen&widget_type=trade&extension=com_ksenmart');
     $this->path->addItem(JText::_('ksm_catalog'));
     switch ($this->getLayout()) {
         case 'category':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/category.js');
             $model = $this->getModel();
             $category = $model->getCategory();
             $model->form = 'category';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($category);
             }
             $this->title = JText::_('ksm_catalog_category_editor');
             $this->form = $form;
             break;
         case 'set':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/set.js');
             $model = $this->getModel();
             $this->set = $model->getSet();
             $model->form = 'set';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($this->set);
             }
             $this->title = JText::_('ksm_catalog_set_editor');
             $this->form = $form;
             break;
         case 'product':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/product.js');
             $model = $this->getModel();
             $this->product = $model->getProduct();
             $model->form = 'product';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($this->product);
             }
             $this->title = JText::_('ksm_catalog_product_editor');
             $this->form = $form;
             break;
         case 'child':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/child.js');
             $model = $this->getModel();
             $this->child = $model->getChild();
             $model->form = 'child';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($this->child);
             }
             $this->title = JText::_('ksm_catalog_child_editor');
             $this->form = $form;
             break;
         case 'childgroup':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/childgroup.js');
             $model = $this->getModel();
             $childgroup = $model->getChildGroup();
             $model->form = 'childgroup';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($childgroup);
             }
             $this->title = JText::_('ksm_catalog_child_group_editor');
             $this->form = $form;
             break;
         case 'manufacturer':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/manufacturer.js');
             $model = $this->getModel();
             $manufacturer = $model->getManufacturer();
             $model->form = 'manufacturer';
             $form = $model->getForm();
             if ($form) {
                 $form->bind($manufacturer);
             }
             $this->title = JText::_('ksm_catalog_manufacturer_editor');
             $this->form = $form;
             break;
         case 'search':
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/list.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/listmodule.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/catalogsearch.js');
             $this->title = JText::_('ksm_catalog_search');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
             break;
         default:
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/jquery.custom.min.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/list.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/listmodule.js');
             $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/catalog.js');
             $this->items = $this->get('ListItems');
             $this->total = $this->get('Total');
     }
     parent::display($tpl);
 }
Пример #15
0
 public function display($tpl = null)
 {
     $_session = JFactory::getSession();
     $model_account = KSSystem::getModel('account');
     $controller = KSSystem::getController('account');
     $this->title = JText::_('KM_CATALOG_YA_MARKET');
     $model = $this->getModel('yamarket');
     $app = JFactory::getApplication();
     $this->document->addScript(JURI::base() . 'components/com_ksenmart/js/yamarket.js');
     $this->document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/yamarket.css');
     if (!$model_account->checkAuthorize()) {
         $app->redirect('index.php?option=com_ksenmart&view=account&layout=default_login');
     } else {
         $uid = $model_account->getUserId();
         if (!empty($uid) && $uid > 0) {
             $layout = $this->getLayout();
             $params = $model->getUserParams($uid);
             if (empty($params->ya_site_id)) {
                 $app->redirect('index.php?option=com_ksenmart', 'KM_YA_MARKET_ACCESS_DENIED');
                 exit;
             }
             $shop_info = $model->getUserShopInfo($params->ya_site_id);
             switch ($layout) {
                 case 'stat-placement':
                     $jinput = $app->input;
                     $fromDate = $jinput->get('fromDate', date('Y-m-d'), 'string');
                     $toDate = $jinput->get('toDate', date('Y-m-d'), 'string');
                     $groupBy = $jinput->get('groupBy', 'daily', 'string');
                     $this->path->addItem(JText::_('KM_YA_MARKET'), 'index.php?option=com_ksenmart&view=yamarket');
                     $this->path->addItem(JText::_('KM_YA_HITS_FOR_PLACEMENTS'));
                     $statistic = $model->getShopStatisticByPlacesFull($fromDate, $toDate, $groupBy);
                     $groupByList = JHTML::_('select.genericlist', array('daily' => 'дням', 'weekly' => 'неделям', 'monthly' => 'месяцам'), 'groupBy', 'class="inputbox"', 'value', 'text', $groupBy);
                     $this->assignRef('statistic', $statistic);
                     $this->assignRef('fromDate', $fromDate);
                     $this->assignRef('toDate', $toDate);
                     $this->assignRef('groupByList', $groupByList);
                     break;
                 case 'clicks-report-search':
                     $jinput = $app->input;
                     $groupBy = $jinput->get('groupBy', '-1', 'string');
                     $this->path->addItem(JText::_('KM_YA_MARKET'), 'index.php?option=com_ksenmart&view=yamarket');
                     $this->path->addItem(JText::_('KM_YA_CLICKS_REPORT_SEARCH'));
                     $offersStatistic = $model->getShopOffersStatistic($groupBy, true);
                     $groupByList = JHTML::_('select.genericlist', array('-1' => 'вчера', '-7' => '7 дней', '-30' => '30 дней'), 'groupBy', 'class="inputbox"', 'value', 'text', $groupBy);
                     $this->assignRef('offersStatistic', $offersStatistic);
                     $this->assignRef('groupByList', $groupByList);
                     break;
                 default:
                     $offers = $this->get('ShopOffers');
                     $balance = $this->get('ShopBalance');
                     $statistic = $this->get('ShopStatistic');
                     $statisticByPlaces = $this->get('ShopStatisticByPlaces');
                     $offersStatistic = $this->get('ShopOffersStatistic');
                     /*$test    = $this->get('Test');
                       print_r($test);*/
                     $this->assignRef('params', $params);
                     $this->assignRef('offers', $offers);
                     $this->assignRef('balance', $balance);
                     $this->assignRef('statistic', $statistic);
                     $this->assignRef('statisticByPlaces', $statisticByPlaces);
                     $this->assignRef('offersStatistic', $offersStatistic);
                     $this->assignRef('shop_info', $shop_info);
                     break;
             }
         }
     }
     parent::display($tpl);
 }