Example #1
0
 public function onAfterDisplayKSMCartDefault_congratulation($view, $tpl = null, &$html)
 {
     if (empty($view->order)) {
         return;
     }
     if (empty($view->order->payment_id)) {
         return;
     }
     $payment = KSMWalletone::getPayment($view->order->payment_id, $this->_name);
     if ($payment->id <= 0) {
         return;
     }
     if (empty($view->order->region_id)) {
         return;
     }
     if (!$this->checkRegion($payment->regions, $view->order->region_id)) {
         return;
     }
     $params = new JRegistry();
     $params->loadString($payment->params);
     $view->payment_params = $params;
     $view->payment_form_params = new stdClass();
     $view->payment_form_params->title = 'Оплата заказа №' . $view->order->id . ' на сайте ' . JFactory::getConfig()->get('sitename');
     $paymentTypes = $this->_preparePaymentTypes($view->payment_params->get('payment_types', array()));
     $view->user = KSUsers::getUser();
     KSMWalletone::_setFields(array_merge($paymentTypes, array('WMI_MERCHANT_ID' => $view->payment_params->get('merchant_id', null), 'WMI_PAYMENT_AMOUNT' => $view->order->costs['total_cost'], 'WMI_PAYMENT_NO' => $view->order->id, 'WMI_CURRENCY_ID' => 643, 'WMI_DESCRIPTION' => $view->payment_form_params->title, 'WMI_CUSTOMER_FIRSTNAME' => $view->order->customer_fields->first_name, 'WMI_CUSTOMER_LASTNAME' => $view->order->customer_fields->last_name, 'WMI_CUSTOMER_EMAIL' => $view->order->customer_fields->email, 'WMI_FAIL_URL' => JRoute::_(JURI::base() . 'index.php?option=com_ksenmart&view=cart&layout=pay_error'), 'WMI_SUCCESS_URL' => JRoute::_(JURI::base() . 'index.php?option=com_ksenmart&view=cart&layout=pay_success'))));
     $view->payment_form_params->sign = KSMWalletone::getHash($view->payment_params->get('secretKey', null));
     $html .= KSSystem::loadPluginTemplate($this->_name, $this->_type, $view, 'default_paymentform');
     return true;
 }
Example #2
0
 function getCurrency()
 {
     $this->onExecuteBefore('getCurrency');
     $id = JRequest::getInt('id');
     $currency = KSSystem::loadDbItem($id, 'currencies');
     $this->onExecuteAfter('getCurrency', array(&$currency));
     return $currency;
 }
Example #3
0
 public function load_order()
 {
     $session = JFactory::getSession();
     $model = $this->getModel('profile');
     $order = $model->getOrder();
     $session->set('shopcart_discount', $order->coupon);
     $session->set('shop_order_id', $order->id);
     $this->setRedirect(JRoute::_('index.php?option=com_ksenmart&view=cart&Itemid=' . KSSystem::getShopItemid(), false));
 }
Example #4
0
 function getImportStep()
 {
     $jinput = JFactory::getApplication()->input;
     $this->view->encoding = $jinput->get('encoding', 'cp1251');
     if (!($this->view->info = $this->importCSV())) {
         return false;
     }
     $html = KSSystem::loadPluginTemplate($this->_name, $this->_type, $this->view, 'result');
     return $html;
 }
Example #5
0
 function close_order()
 {
     $session = JFactory::getSession();
     $order_id = $session->get('shop_order_id', 0);
     if ($order_id != 0) {
         $model = $this->getModel('cart');
         $model->closeOrder();
         $this->setRedirect(JRoute::_('index.php?option=com_ksenmart&view=cart&layout=congratulation&Itemid=' . KSSystem::getShopItemid(), false));
     }
 }
Example #6
0
 function getDiscount()
 {
     $this->onExecuteBefore('getDiscount');
     $id = JRequest::getInt('id');
     $discount = KSSystem::loadDbItem($id, 'discounts');
     $discount = KSMedia::setItemMedia($discount, 'discount');
     if (empty($discount->from_date)) {
         $discount->from_date = date('d.m.Y');
     }
     if (empty($discount->to_date)) {
         $discount->to_date = date('d.m.Y');
     }
     if (empty($discount->categories)) {
         $discount->categories = '{}';
     }
     if (empty($discount->manufacturers)) {
         $discount->manufacturers = '{}';
     }
     if (empty($discount->regions)) {
         $discount->regions = '{}';
     }
     if (empty($discount->params)) {
         $discount->params = '{}';
     }
     if (empty($discount->user_actions)) {
         $discount->user_actions = '{}';
     }
     if (empty($discount->user_groups)) {
         $discount->user_groups = '{}';
     }
     if (empty($discount->info_methods)) {
         $discount->info_methods = '{}';
     }
     if (empty($discount->type)) {
         $discount->type = $this->getState('discount_type');
     }
     $discount->categories = json_decode($discount->categories, true);
     $discount->manufacturers = json_decode($discount->manufacturers, true);
     $discount->regions = json_decode($discount->regions, true);
     $discount->params = json_decode($discount->params, true);
     $discount->user_actions = json_decode($discount->user_actions, true);
     $discount->user_groups = json_decode($discount->user_groups, true);
     $discount->info_methods = json_decode($discount->info_methods, true);
     $discount->from_date = date('d.m.Y', strtotime($discount->from_date));
     $discount->to_date = date('d.m.Y', strtotime($discount->to_date));
     $this->setState('discount_type', $discount->type);
     $this->setState('discount_params', $discount->params);
     $this->setState('discount_id', $discount->id);
     $this->onExecuteAfter('getDiscount', array(&$discount));
     return $discount;
 }
Example #7
0
 public function onLoadKsen($ext_name_local, array $hFolders = array(), array $ignoreHelpers = array(), array $config = array())
 {
     global $ext_name, $ext_name_com, $ext_prefix;
     $ext_name = $ext_name_local;
     if (strripos($ext_name_local, '.') !== false) {
         list($ext_name, $ext_prefix) = explode('.', $ext_name_local);
     }
     $ext_name_com = 'com_' . $ext_name;
     $document = JFactory::getDocument();
     $version = new JVersion();
     $this->input = JFactory::getApplication()->input;
     $option = $this->input->get('option', null, 'string');
     $extension = $this->input->get('extension', $ext_name_com, 'string');
     include_once dirname(__FILE__) . '/core/defines.php';
     include_once KSC_ADMIN_PATH_CORE_HELPERS . 'helper.php';
     KSLoader::loadCoreHelpers($hFolders, $ignoreHelpers);
     if (!isset($config['admin'])) {
         $config['admin'] = false;
     }
     JHtml::_('behavior.keepalive');
     if ($version->RELEASE < 3.0) {
     } else {
         JHtml::_('jquery.framework');
         JHtml::_('jquery.ui');
         JHtml::_('bootstrap.framework');
     }
     if ($config['admin']) {
         KSSystem::addCSS(array('style', 'prog-style', 'nprogress', 'ui-lightness/jquery-ui-1.8.20.custom'));
         if ($version->RELEASE >= 3.0) {
             JHtml::_('jquery.ui', array('sortable'));
             JHtml::_('bootstrap.framework');
             JHtml::_('behavior.framework');
         } else {
             $document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js');
         }
         KSSystem::addJS(array('common', 'style', 'nprogress', 'list', 'listmodule'));
     }
     if ($this->params->get('angularJS', 1) && $config['angularJS']) {
     }
     $script = '
         var KS = {
             extension: \'' . $extension . '\',
             option: \'' . $ext_name_com . '\'
         };
     ';
     $document->addScriptDeclaration($script);
     KSSystem::loadPlugins();
     KSSystem::import('libraries.ksdb');
 }
Example #8
0
 public static function __callStatic($name, array $func_params)
 {
     $params = self::getParams();
     $layouts = $params->get('layouts', array());
     foreach ($layouts as $layout) {
         $func = 'on' . $layout->event . 'DisplayKSM' . $layout->layout;
         if ($name == $func) {
             $view = $func_params[0];
             $tpl =& $func_params[1];
             $html =& $func_params[2];
             $html .= KSSystem::loadModules($layout->position);
         }
     }
     return;
 }
Example #9
0
 public function add_comment()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel('Product', 'KsenmartModel');
     $comments_model = $this->getModel('Comments', 'KsenmartModel');
     $return_url = JRoute::_('index.php?option=com_ksenmart&view=product&id=' . $model->_id . '&Itemid=' . KSSystem::getShopItemid());
     $requestData = $this->input->post->get('jform', array(), 'array');
     $data = array();
     if (count($requestData)) {
         $model->form = 'review';
         $form = $model->getForm();
         if (!$form) {
             JError::raiseError(500, $model->getError());
             return false;
         }
         $data = $model->validate($form, $requestData);
         if ($data === false) {
             $errors = $model->getErrors();
             for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {
                 if ($errors[$i] instanceof Exception) {
                     $app->enqueueMessage($errors[$i]->getMessage(), 'warning');
                 } else {
                     $app->enqueueMessage($errors[$i], 'warning');
                 }
             }
             $this->setRedirect($return_url);
             return false;
         }
     } else {
         $data = array();
         $data['comment_name'] = $this->input->post->get('comment_name', $user->name, 'string');
         $data['comment_rate'] = $this->input->post->get('comment_rate', 0, 'int');
         $data['comment_comment'] = $this->input->post->get('comment_comment', null, 'string');
         $data['comment_good'] = $this->input->post->get('comment_good', null, 'string');
         $data['comment_name'] = $this->input->post->get('comment_bad', null, 'string');
     }
     $data['product_id'] = $model->_id;
     $comments_model->addComment($data);
     if (!isset($_SESSION['rated']) || !is_array($_SESSION['rated'])) {
         $_SESSION['rated'] = array();
     }
     $_SESSION['rated'][$model->_id] = 1;
     $this->setMessage('Ваш отзыв принят');
     $this->setRedirect($return_url);
     return true;
 }
Example #10
0
 public function getInput($name, $group = null, $value = null)
 {
     $dispatcher = JDispatcher::getInstance();
     $formname = $this->getName();
     $formname = explode('.', $formname);
     $formname = $formname[count($formname) - 1];
     $html = '';
     $dispatcher->trigger('onBeforeGet' . strtoupper($this->ext_prefix) . 'FormInput' . ucfirst($formname) . ucfirst($name), array(&$this, &$name, &$html));
     if ($name != 'empty' && ($field = $this->getField($name, $group, $value))) {
         $element = $this->findField($name, $group);
         $field_html = $field->input;
         if (isset($element['wrap']) && !empty($element['wrap'])) {
             $field_html = KSSystem::wrapFormField($element['wrap'], $element, $field_html);
         }
         $html .= $field_html;
     }
     $dispatcher->trigger('onAfterGet' . strtoupper($this->ext_prefix) . 'FormInput' . ucfirst($formname) . ucfirst($name), array(&$this, &$name, &$html));
     return $html;
 }
Example #11
0
 public static function AddHeadTags()
 {
     if (self::$_headAdded == true) {
         return;
     }
     $session = JFactory::getSession();
     $document = JFactory::getDocument();
     JDispatcher::getInstance()->trigger('onLoadKsen', array('ksenmart.KSM', array('common'), array(), array('angularJS' => 0)));
     KSLoader::loadLocalHelpers(array('common'));
     $params = JComponentHelper::getParams('com_ksenmart');
     $document->addScript(JURI::base() . 'administrator/components/com_ksenmart/js/jquery.custom.min.js');
     $document->addScript(JURI::base() . 'components/com_ksenmart/js/common.js');
     $document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/common.css');
     if ($params->get('include_css', 1)) {
         $document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/template.css');
     }
     $js = "\n        var URI_ROOT='" . JURI::root() . "';\n        var km_cart_link='" . JRoute::_('index.php?option=com_ksenmart&view=cart&Itemid=' . KSSystem::getShopItemid()) . "';\n        var shopItemid='" . KSSystem::getShopItemid() . "';\n        var order_type='ordering';\n        var order_dir='asc';    \n        var limit=" . $params->get('site_product_limit', 30) . ";\n        var limitstart=0;   \n        var use_pagination=" . $params->get('site_use_pagination', 0) . ";\n        var order_process=" . $params->get('order_process', 0) . ";\n        var cat_id=" . JRequest::getInt('id', 0) . ";\n        var user_id=" . JFactory::getUser()->id . ";\n        var page=1;\n        var session_id='" . $session->getId() . "';\n        ";
     $document->addScriptDeclaration($js);
     self::$_headAdded = true;
     KSSystem::loadPlugins();
 }
Example #12
0
 public function getInput()
 {
     $db = JFactory::getDBO();
     $this->value = is_array($this->value) ? $this->value : array();
     $html = '<style>.form-horizontal .controls {margin:0px;}</style>';
     $html .= '<table class="table table-striped" id="articleList">';
     $html .= '	<thead>';
     $html .= '		<tr>';
     $html .= '			<th class="title">' . JText::_('ksm_plugin_modules_module_title') . '</th>';
     $html .= '			<th width="10%" class="nowrap hidden-phone">' . JText::_('ksm_plugin_modules_module_position') . '</th>';
     $html .= '			<th width="30%" class="nowrap hidden-phone">' . JText::_('ksm_plugin_modules_module_pages') . '</th>';
     $html .= '			<th width="30%" class="hidden-phone">' . JText::_('ksm_plugin_modules_module_categories') . '</th>';
     $html .= '		</tr>';
     $html .= '	</thead>';
     $query = $db->getQuery(true);
     $query->select('a.id, a.title, a.position, a.published, map.menuid')->from('#__modules AS a')->join('LEFT', sprintf('#__modules_menu AS map ON map.moduleid = a.id AND map.menuid IN (0, %1$d, -%1$d)', KSSystem::getShopItemid()))->select('(SELECT COUNT(*) FROM #__modules_menu WHERE moduleid = a.id AND menuid < 0) AS ' . $db->quoteName('except'));
     $query->select('ag.title AS access_title')->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access')->where('a.published >= 0')->where('a.client_id = 0')->where('a.title != ' . $db->quote(''))->order('a.position, a.ordering');
     $db->setQuery($query);
     $modules = $db->loadObjectList();
     $page_options = array(JHtml::_('select.option', 0, JText::_('JALL')), JHtml::_('select.option', -1, JText::_('ksm_plugin_modules_noone')));
     foreach ($this->pages as $key => $page) {
         $page_options[] = JHtml::_('select.option', $key, JText::_('ksm_plugin_modules_page_' . $page));
     }
     $cat_options = $this->getCatOptions();
     foreach ($modules as $module) {
         if (is_null($module->menuid) && (!$module->except || $module->menuid < 0)) {
             continue;
         }
         $selected_pages = isset($this->value[$module->position][$module->id]['pages']) ? $this->value[$module->position][$module->id]['pages'] : array(0);
         $selected_cats = isset($this->value[$module->position][$module->id]['categories']) ? $this->value[$module->position][$module->id]['categories'] : array(0);
         $html .= '<tr>';
         $html .= '	<td class="title">' . $module->title . '</th>';
         $html .= '	<td width="10%" class="nowrap hidden-phone">' . $module->position . '</th>';
         $html .= '	<td width="30%" class="nowrap hidden-phone">' . JHtml::_('select.genericlist', $page_options, $this->name . '[' . $module->position . '][' . $module->id . '][pages][]', 'multiple="multiple"', 'value', 'text', $selected_pages) . '</th>';
         $html .= '	<td width="30%" class="hidden-phone">' . JHtml::_('select.genericlist', $cat_options, $this->name . '[' . $module->position . '][' . $module->id . '][categories][]', 'multiple="multiple"', 'value', 'text', $selected_cats) . '</th>';
         $html .= '</tr>';
     }
     $html .= '</table>';
     return $html;
 }
Example #13
0
 function getManufacturers($group)
 {
     $db = JFactory::getDBO();
     $session_manufacturers = JRequest::getVar('manufacturers', array());
     JArrayHelper::toInteger($session_manufacturers);
     $query = $db->getQuery(true);
     $query->select('
     		km.*,
     		kf.filename,
     		kf.folder,
     		kf.params
     	')->from('#__ksenmart_manufacturers as km')->leftjoin("#__ksenmart_countries as kc on km.country=kc.id")->leftjoin("#__ksenmart_files as kf on kc.id=kf.owner_id and kf.owner_type='country'")->where('km.published=1')->order('km.title');
     if ($group) {
         $query->select('
                 kc.id AS country_id,
                 kc.title AS country_title
             ');
     } else {
         $query->group('km.id');
     }
     $db->setQuery($query);
     $manufacturers = $db->loadObjectList('id');
     $tmpManufacturers = array();
     foreach ($manufacturers as &$manufacturer) {
         $manufacturer->selected = in_array($manufacturer->id, $session_manufacturers) ? true : false;
         if (!empty($manufacturer->folder)) {
             $manufacturer->small_img = KSMedia::resizeImage($manufacturer->filename, $manufacturer->folder, 25, 30, json_decode($manufacturer->params, true));
         }
         unset($manufacturer->filename);
         unset($manufacturer->folder);
         $manufacturer->link = JRoute::_('index.php?option=com_ksenmart&view=catalog&manufacturers[]=' . $manufacturer->id . '&Itemid=' . KSSystem::getShopItemid());
         if ($group) {
             $tmpManufacturers[$manufacturer->country_title][] = $manufacturer;
         }
     }
     if (!$tmpManufacturers) {
         $tmpManufacturers = $manufacturers;
     }
     return $tmpManufacturers;
 }
Example #14
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
KSSystem::import('models.modelkslist');
class KsenMartModelSearch extends JModelKSList
{
    public $_correct_string = null;
    public $_limit_relevant = null;
    public $_limit_categories = null;
    public $_limit_manufacture = null;
    public $_limit_products = null;
    private $_search_fields = array('p.title', 'p.introcontent', 'p.tag', 'c.title', 'p.product_code');
    public function __construct()
    {
        parent::__construct();
        $ajax_search = JRequest::getVar('ajax_search', 0);
        if ($ajax_search) {
            $this->params = new JRegistry();
            $module = JModuleHelper::getModule('km_simple_search');
            if (!empty($module->params)) {
                $this->params->loadString($module->params);
            }
            $this->_limit_relevant = $this->params->get('count_relevants', 3);
            $this->_limit_categories = $this->params->get('count_categories', 1);
            $this->_limit_manufacture = $this->params->get('count_manufactured', 1);
            $this->_limit_products = $this->params->get('count_result', 5);
        } else {
Example #15
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$Itemid = KSSystem::getShopItemid();
$link = JRoute::_('index.php?option=com_ksenmart&view=cart&Itemid=' . $Itemid);
?>
<a href="<?php 
echo $link;
?>
">
	<b class="muted"><?php 
echo JText::_('KSM_CART_MINICART_LABEL');
?>
 [0]</b>
	<small class="muted"><?php 
echo JText::_('KSM_CART_MINICART_TEXT');
?>
</small>
</a>
Example #16
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
KSSystem::import('helpers.corehelper');
class KSMWalletone extends KSCoreHelper
{
    private static $_fields = array();
    public static function _setFields(array $data)
    {
        if (!empty($data)) {
            foreach ($data as $key => $value) {
                self::$_fields[$key] = $value;
            }
        }
        return $data;
    }
    public static function _getFields()
    {
        if (empty(self::$_fields)) {
            self::$_fields = array();
        }
        return self::$_fields;
    }
    public static function getHash($secretKey)
    {
        $data = self::_getFields();
        if (!empty($data)) {
Example #17
0
<?php

defined('_JEXEC') or die;
$user = KSUsers::getUser();
$profile_link = JRoute::_('index.php?option=com_ksenmart&view=profile&Itemid=' . KSSystem::getShopItemid());
?>
<div class="accordion catalog-menu" id="dropdownCat">
	<h3><?php 
echo $module->title;
?>
</h3>
	<div class="user-info">
		<div class="avatar">
			<img src="<?php 
echo $user->logo_thumb;
?>
" alt="<?php 
echo $user->name;
?>
" class="border_ksen" />
		</div>
		<div class="user_name"><?php 
echo $user->name;
?>
</div>
		<br clear="both">
	</div>
	<div class="left-menu">
		<ul class="nav nav-list">
			<li><a href="<?php 
echo $profile_link;
Example #18
0
 function getProductCategory($product_id)
 {
     $final_categories = array();
     $parent_ids = array();
     $default_category = $this->getDefaultCategory($product_id);
     $product_categories = $this->getProductCategories($product_id);
     foreach ($product_categories as $product_category) {
         if (!empty($default_category)) {
             $id_default_way = false;
         } else {
             $id_default_way = true;
         }
         $categories = array();
         $parent = $product_category->category_id;
         while ($parent != 0) {
             if ($parent == $default_category) {
                 $id_default_way = true;
             }
             $category = KSSystem::getTableByIds(array($parent), 'categories', array('t.id', 't.parent_id'), true, false, true);
             $categories[] = $category->id;
             $parent = $category->parent_id;
         }
         if ($id_default_way && count($categories) > count($final_categories)) {
             $final_categories = $categories;
         }
     }
     $category_id = count($final_categories) ? $final_categories[0] : 0;
     return $category_id;
 }
Example #19
0
 function getManufacturer()
 {
     $this->onExecuteBefore('getManufacturer');
     $id = JRequest::getInt('id');
     $manufacturer = KSSystem::loadDbItem($id, 'manufacturers');
     $manufacturer = KSMedia::setItemMedia($manufacturer, 'manufacturer');
     $this->onExecuteAfter('getManufacturer', array(&$manufacturer));
     return $manufacturer;
 }
Example #20
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$view = JRequest::getVar('view', 'panel');
if (in_array('*', $params->get('views', array('catalog'))) || in_array($view, $params->get('views', array('catalog')))) {
    KSSystem::loadModuleFiles('mod_km_manufacturers');
    require_once dirname(__FILE__) . DS . 'helper.php';
    $manufacturers = ModKMManufacturersHelper::getManufacturers();
    $layout = KSSystem::getModuleLayout('mod_km_manufacturers');
    require JModuleHelper::getLayoutPath('mod_km_manufacturers', $layout);
}
Example #21
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
KSSystem::loadModuleFiles('mod_ks_mainmenu');
require_once dirname(__FILE__) . DS . 'helper.php';
global $ext_name_com, $ext_prefix;
$extension = ModKSMainMenuHelper::getExtension();
$lang = JFactory::getLanguage();
$lang->load($extension . '.sys', JPATH_ADMINISTRATOR . '/components/' . $extension, null, false, false) || $lang->load($extension . '.sys', JPATH_ADMINISTRATOR . '/components/' . $extension, $lang->getDefault(), false, false);
$widget_types = ModKSMainMenuHelper::getWidgetTypes();
$current_widget = ModKSMainMenuHelper::getCurrentWidget();
$parent_widget = ModKSMainMenuHelper::getParentWidget($current_widget);
$child_widgets = ModKSMainMenuHelper::getChildWidgets($parent_widget);
$current_widget_type = ModKSMainMenuHelper::getCurrentWidgetType($parent_widget);
require JModuleHelper::getLayoutPath('mod_ks_mainmenu', $params->get('layout', 'default'));
Example #22
0
echo JText::_('ksm_add');
?>
" class="save" ng-click="add_related()">
			<input type="button" class="close" onclick="parent.closePopupWindow();" ng-click="cancel()">
		</div>
	</div>
	<div class="edit">
		<div id="center">
			<table id="cat" class="add-relative" width="100%">
				<tr>
					<td width="250" class="left-column">
						<div id="tree">
							<form id="list-filters">
								<ul>
									<?php 
echo KSSystem::loadModules('km-list-left');
?>
								</ul>
							</form>			
						</div>	
					</td>
					<td valign="top">
						<div id="content">
							<?php 
echo $this->loadTemplate('items_list_top');
?>
							<?php 
echo $this->loadTemplate('items_list');
?>
						</div>	
					</td>	
Example #23
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
KSSystem::import('views.viewksadmin');
class KsenMartViewCallbackkiller extends JViewKSAdmin
{
    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);
    }
}
Example #24
0
 public function onAfterViewAdminKSMExportImport(&$view)
 {
     KSSystem::import('libraries.roistat');
     JHtml::stylesheet('plg_system_roistat/default.css', false, true, false);
     $roistat = Roistat::getInstance();
     $user_isset = false;
     if (!empty($roistat->login)) {
         if ($roistat->checkUser($roistat->login) && !empty($roistat->project)) {
             $user_isset = true;
         }
     }
     if (!$user_isset) {
         JHtml::script('plg_system_roistat/default.js', false, true);
     } else {
         $view->assign('project', $roistat->project);
     }
     $view->assign('user_isset', $user_isset);
     $view->addTemplatePath(JPATH_ROOT . '/plugins/system/roistat/tmpl/');
     return true;
 }
Example #25
0
defined('_JEXEC') or die;
?>
<div class="clearfix panel">
    <div class="pull-left">
        <?php 
echo KSSystem::loadModules('ks-top-left');
?>
    </div>
    <div class="pull-right">
        <?php 
echo KSSystem::loadModules('ks-top-right');
?>
    </div>
    <div class="row-fluid">
        <?php 
echo KSSystem::loadModules('ks-top-bottom');
?>
    </div>
</div>
<div id="metro-ui" rel="<?php 
echo $this->state->get('extension');
?>
">
	<div class="metro-ui-inner">
		<?php 
foreach ($this->widgets_groups as $widgets_group) {
    ?>
		<div class="widgets">
			<?php 
    foreach ($widgets_group as $widget) {
        ?>
Example #26
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
KSSystem::import('models.modelksadmin');
class KsenMartModelExportImport extends JModelKSAdmin
{
    protected function populateState($ordering = null, $direction = null)
    {
        $this->onExecuteBefore('populateState');
        $app = JFactory::getApplication();
        $params = JComponentHelper::getParams('com_ksenmart');
        $type = $app->getUserStateFromRequest('com_ksenmart.exportimport.type', 'type', 'text');
        $this->setState('type', $type);
        $this->context .= '.' . $type;
        $encoding = $app->getUserStateFromRequest($this->context . '.encoding', 'encoding', 'cp1251');
        $this->setState('encoding', $encoding);
        $this->onExecuteAfter('populateState');
    }
    function getProperties($public = true)
    {
        $this->onExecuteBefore('getProperties');
        $query = $this->_db->getQuery(true);
        $query->select('*')->from('#__ksenmart_properties')->order('ordering');
        $this->_db->setQuery($query);
        $properties = $this->_db->loadObjectList();
        $this->onExecuteAfter('getProperties', array(&$properties));
        return $properties;
Example #27
0
" id="default_<?php 
        echo $address->id;
        ?>
" value="1"<?php 
        echo $address->default == 1 ? ' checked' : '';
        ?>
 />
						<?php 
        echo JText::_('KSM_PROFILE_ADDRESSES_USE_AS_DEFAULT');
        ?>
					</label>
					<input type="hidden" id="address_<?php 
        echo $address->id;
        ?>
" value="<?php 
        echo KSSystem::formatAddress($address);
        ?>
" />
					<input type="hidden" id="coords_<?php 
        echo $address->id;
        ?>
" value="<?php 
        echo $address->coords;
        ?>
" />
				</td>
			</tr>
            <tr style="display: none;" class="edit_address" data-exp-tr="<?php 
        echo $address->id;
        ?>
">
Example #28
0
    echo $this->product->tag;
    ?>
</a></span>
		</div>
	</div>
<?php 
}
?>
	
<?php 
if (isset($this->product->manufacturer->country) && count($this->product->manufacturer->country) > 0) {
    ?>
	<div class="control-group">
		<label class="control-label"><?php 
    echo JText::_('KSM_PRODUCT_COUNTRY');
    ?>
</label>
		<div class="controls">
			<span><a href="<?php 
    echo JRoute::_('index.php?option=com_ksenmart&view=catalog&countries[]=' . $this->product->manufacturer->country->id . '&Itemid=' . KSSystem::getShopItemid() . '&clicked=countries');
    ?>
"><?php 
    echo $this->product->manufacturer->country->title;
    ?>
</a></span>
		</div>
	</div>
<?php 
}
?>
	
Example #29
0
 public function getTest()
 {
     $this->onExecuteBefore('getTest');
     if (!empty($this->_sid) && $this->_sid > 0) {
         $function = array('campaigns', $this->_sid, 'bids');
         $params = array('target' => 'search');
         $test = KSSystem::getYaMarketData2($function);
         $this->onExecuteAfter('getTest', array(&$test));
         return $test;
     }
     return new stdClass();
 }
Example #30
0
                        </span>
                    </div>
    				<?php 
}
?>
    				
    				<div class="muted row-fluid bottom_info">
                        <div class="span6 brand">
                            <?php 
if (!empty($product->manufacturer_title)) {
    ?>
                            Бренд: <a href="index.php?option=com_ksenmart&view=catalog&manufacturers[0]=<?php 
    echo $product->manufacturer;
    ?>
&Itemid=<?php 
    echo KSSystem::getShopItemid();
    ?>
" title="<?php 
    echo $product->manufacturer_title;
    ?>
"><?php 
    echo $product->manufacturer_title;
    ?>
</a>
                            <?php 
}
?>
                        </div>
                        <div class="span6 rating">
                            <span class="title">Рейтинг: </span>
            				<?php