Beispiel #1
0
 function display($map, $value)
 {
     $this->load();
     if (count($this->values) == 1 && $this->type == 'style') {
         return '<a target="_blank" href="' . HIKASHOP_REDIRECT . 'hikashop-styles' . '">' . hikashop_tooltip(JText::_('STYLE_TOOLTIP_TEXT'), JText::_('STYLE_TOOLTIP_TITLE'), '', JText::_('STYLE_HIKASHOP')) . '</a>';
     }
     $js = ' onchange="updateCSSLink(\'' . $this->type . '\',\'' . $this->type . '\',this.value);"';
     $aStyle = empty($value) ? ' style="display:none"' : '';
     $html = JHTML::_('select.genericlist', $this->values, $map, 'class="inputbox" size="1"', 'value', 'text', $value, $this->type . '_choice');
     $config =& hikashop_config();
     $manage = hikashop_isAllowed($config->get('acl_config_manage', 'all'));
     if ($manage) {
         $popup = hikashop_get('helper.popup');
         $html .= $popup->display('<img src="' . HIKASHOP_IMAGES . 'edit.png" alt="' . JText::_('HIKA_EDIT') . '"/>', 'CSS', '\'' . 'index.php?option=com_hikashop&amp;tmpl=component&amp;ctrl=config&amp;task=css&amp;file=' . $this->type . '_\'+document.getElementById(\'' . $this->type . '_choice' . '\').value+\'&amp;var=' . $this->type . '\'', $this->type . '_link', 760, 480, $aStyle, '', 'link', true);
     }
     return $html;
 }
Beispiel #2
0
				<input name="<?php 
echo $this->name;
?>
[msg]" type="text" value="<?php 
echo @$this->element['msg'];
?>
" />
			</dd>
		</dl>
		<?php 
if (preg_match('/wishlist/', $this->name)) {
    ?>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php 
    echo hikashop_tooltip(JText::sprintf('CART_MODULE_ITEMID_DESC', $this->type), '', '', JText::_('HIKA_ITEM_ID'), '', 0);
    ?>
			</dt>
			<dd class="hikashop_option_value">
				<input name="<?php 
    echo $this->name;
    ?>
[cart_itemid]" type="text" value="<?php 
    echo @$this->element['cart_itemid'];
    ?>
" />
			</dd>
		</dl>
		<?php 
}
?>
Beispiel #3
0
defined('_JEXEC') or die('Restricted access');
?>
<div class="hkc-xl-4 hkc-lg-6 hikashop_product_block hikashop_product_edit_shippingfees"><div>
	<div class="hikashop_product_part_title hikashop_product_edit_shippingfees_title"><?php 
echo JText::_('SHIPPING_PRICES');
?>
</div>
	<table class="adminlist table table-striped hikashop_product_prices_table" width="100%">
		<thead>
			<tr>
				<th class="title"><?php 
echo JText::_('HIKA_NAME');
?>
</th>
				<th class="title" width="6%"><?php 
echo hikashop_tooltip(JText::_('MINIMUM_QUANTITY'), '', '', JText::_('MIN_QTY'), '', 0);
?>
</th>
				<th class="title"><?php 
echo JText::_('PRICE');
?>
</th>
				<th class="title"><?php 
echo JText::_('FEE');
?>
</th>
				<th class="title"><?php 
echo JText::_('SHIPPING_BLOCKED');
?>
</th>
				<th class="title"><?php 
Beispiel #4
0
echo JText::_('HIKA_OUT_OF_STOCK');
?>
			</dt>
			<dd class="hikashop_option_value">
				<?php 
if (!isset($this->element['show_out_of_stock'])) {
    $this->element['show_out_of_stock'] = '-1';
}
echo JHTML::_('hikaselect.inheritRadiolist', $this->name . '[show_out_of_stock]', @$this->element['show_out_of_stock']);
?>
			</dd>
		</dl>
		 <dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php 
echo hikashop_tooltip(JText::_('SYNCHRO_WITH_ITEM'), '', '', JText::_('HIKA_SYNCHRONIZE'), '', 0);
?>
			</dt>
			<dd class="hikashop_option_value">
				<?php 
if (!isset($this->element['content_synchronize'])) {
    $this->element['content_synchronize'] = '-1';
}
echo JHTML::_('hikaselect.inheritRadiolist', $this->name . '[content_synchronize]', @$this->element['content_synchronize']);
?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php 
echo $this->type;
Beispiel #5
0
							</span>
						<?php 
    }
    $config =& hikashop_config();
    $affiliate_payment_delay = $config->get('affiliate_payment_delay');
    ?>
						<table class="hikashop_affiliate_stats_table table">
							<thead>
								<tr>
									<th></th>
									<?php 
    if (!empty($affiliate_payment_delay)) {
        ?>
<th><?php 
        $delayType = hikashop_get('type.delay');
        echo hikashop_tooltip(JText::sprintf('AMOUNT_DELAY', $delayType->displayDelay($config->get('affiliate_payment_delay'))), JText::_('PAYABLE'), '', JText::_('PAYABLE'));
        ?>
</th><?php 
    }
    ?>
									<th><?php 
    echo JText::_('HIKASHOP_TOTAL');
    ?>
</th>
								</tr>
							</thead>
							<tbody>
						<?php 
    if (bccomp($this->user->user_params->user_partner_click_fee, 0, 5)) {
        ?>
						<tr id="affiliate_unpaid_clicks">
Beispiel #6
0
if (hikashop_acl('product/edit/productlayout')) {
    ?>
			<dt class="hikashop_product_productlayout"><label><?php 
    echo JText::_('PAGE_LAYOUT');
    ?>
</label></dt>
			<dd class="hikashop_product_productlayout"><?php 
    echo $this->productDisplayType->display('data[product][product_layout]', @$this->product->product_layout);
    ?>
</dd>
<?php 
}
if (hikashop_acl('product/edit/quantitylayout')) {
    ?>
			<dt class="hikashop_product_quantitylayout"><label><?php 
    echo hikashop_tooltip(JText::_('QUANTITY_LAYOUT_ON_PRODUCT_PAGE'), '', '', JText::_('QUANTITY_LAYOUT'), '', 0);
    ?>
</label></dt>
			<dd class="hikashop_product_quantitylayout"><?php 
    echo $this->quantityDisplayType->display('data[product][product_quantity_layout]', @$this->product->product_quantity_layout);
    ?>
</dd>
<?php 
}
?>
		</dl>
	</div></div>

<?php 
JPluginHelper::importPlugin('hikashop');
$dispatcher = JDispatcher::getInstance();
Beispiel #7
0
?>
				</dt>
				<dd class="hikashop_option_value">
					<input name="<?php 
echo $this->name;
?>
[ul_class_name]" type="text" value="<?php 
echo @$this->element['ul_class_name'];
?>
" />
				</dd>
<?php 
if ($this->type == 'category') {
    ?>
				<dt class="hikashop_option_name">
					<?php 
    echo hikashop_tooltip(JText::_('UL_DISPLAY_SIMPLELIST'), '', '', JText::_('UL_DISPLAY_SIMPLELIST'), '', 0);
    ?>
				</dt>
				<dd class="hikashop_option_value"><?php 
    echo JHTML::_('hikaselect.booleanlist', $this->name . '[ul_display_simplelist]', '', @$this->element['ul_display_simplelist']);
    ?>
</dd>
<?php 
}
?>
			</dl>
		</div>
	</div>
</div>
Beispiel #8
0
echo JText::_('HIKA_OUT_OF_STOCK');
?>
			</dt>
			<dd class="hikashop_option_value">
				<?php 
if (!isset($this->element['show_out_of_stock'])) {
    $this->element['show_out_of_stock'] = '-1';
}
echo JHTML::_('hikaselect.inheritRadiolist', $this->name . '[show_out_of_stock]', @$this->element['show_out_of_stock']);
?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<?php 
echo hikashop_tooltip(JText::_('HIKA_PRODUCT_RELATION'), '', '', JText::_('HIKA_RELATION'), '', 0);
?>
			</dt>
			<dd>
				<?php 
if (!isset($this->element['product_synchronize'])) {
    $this->element['product_synchronize'] = 4;
}
echo $this->productSyncType->display($this->name . '[product_synchronize]', @$this->element['product_synchronize']);
?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_module__<?php 
echo $this->type;
Beispiel #9
0
 public function &getNameboxData($typeConfig, &$fullLoad, $mode, $value, $search, $options)
 {
     $ret = array(0 => array(), 1 => array());
     static $multiTranslation = null;
     if ($multiTranslation === null) {
         $translationHelper = hikashop_get('helper.translation');
         $multiTranslation = $translationHelper->isMulti(true);
     }
     $db = JFactory::getDBO();
     $app = JFactory::getApplication();
     $category_type = array('product', 'root', 'vendor', 'manufacturer');
     if (!empty($typeConfig['params']['category_type'])) {
         $category_type = $typeConfig['params']['category_type'];
     }
     if (is_string($category_type)) {
         $category_type = explode(',', $category_type);
     }
     $fullLoad = false;
     $displayFormat = !empty($options['displayFormat']) ? $options['displayFormat'] : @$typeConfig['displayFormat'];
     $depth = (int) @$options['depth'];
     $start = (int) @$options['start'];
     $limit = (int) @$options['limit'];
     $page = (int) @$options['page'];
     if ($depth <= 0) {
         $depth = 1;
     }
     if ($limit <= 0) {
         $limit = $typeConfig['mode'] == 'list' ? 10 : 200;
     }
     $category_types = array();
     foreach ($category_type as $t) {
         $category_types[] = $db->Quote($t);
     }
     $select = array('c.*');
     $table = array(hikashop_table('category') . ' AS c');
     $where = array('c.category_type IN (' . implode(',', $category_types) . ')');
     if ($typeConfig['mode'] == 'list') {
         $where[] = 'c.category_namekey NOT IN (' . implode(',', $category_types) . ')';
     }
     if (in_array('product', $category_type) && empty($search)) {
         if (empty($start)) {
             $where[] = 'c.category_depth >= 0 AND c.category_depth <= ' . $depth;
         } else {
             $where[] = 'c.category_depth >= cp.category_depth AND c.category_depth <= (cp.category_depth + ' . $depth . ')';
         }
     }
     if (!empty($search)) {
         $searchStr = "'%" . (HIKASHOP_J30 ? $db->escape($search, true) : $db->getEscaped($search, true)) . "%'";
         $where[] = '(c.category_name LIKE ' . $searchStr . ' OR c.category_id = ' . $start . ')';
     }
     if ($start > 0) {
         $table[] = 'INNER JOIN ' . hikashop_table('category') . ' AS cp On cp.category_id = ' . $start;
         $where[] = '(c.category_left >= cp.category_left AND c.category_right <= cp.category_right)';
     }
     if ($typeConfig['mode'] == 'list') {
         $order = ' ORDER BY c.category_name ASC';
     } else {
         $order = ' ORDER BY c.category_parent_id ASC, c.category_ordering';
     }
     $query = 'SELECT ' . implode(', ', $select) . ' FROM ' . implode(' ', $table) . ' WHERE ' . implode(' AND ', $where) . $order;
     $db->setQuery($query, $page, $limit);
     if (!$app->isAdmin() && $multiTranslation && class_exists('JFalangDatabase')) {
         $categories = $db->loadObjectList('category_id', 'stdClass', false);
     } elseif (!$app->isAdmin() && $multiTranslation && (class_exists('JFDatabase') || class_exists('JDatabaseMySQLx'))) {
         $categories = $db->loadObjectList('category_id', false);
     } else {
         $categories = $db->loadObjectList('category_id');
     }
     if ($typeConfig['mode'] == 'list') {
         if (count($categories) < $limit) {
             $fullLoad = true;
         }
         if (!empty($typeConfig['params']['category_type']) && $typeConfig['params']['category_type'] == 'status') {
             foreach ($categories as $category) {
                 if (!empty($category->translation)) {
                     $ret[0][$category->category_name] = hikashop_orderStatus($category->translation);
                 } else {
                     $ret[0][$category->category_name] = hikashop_orderStatus($category->category_name);
                 }
             }
         } elseif (!empty($typeConfig['params']['category_type']) && $typeConfig['params']['category_type'] == 'manufacturer') {
             foreach ($categories as $category) {
                 $ret[0][$category->category_id] = !empty($category->translation) ? $category->translation : $category->category_name;
             }
         } else {
             foreach ($categories as $category) {
                 $ret[0][$category->category_name] = !empty($category->translation) ? $category->translation : $category->category_name;
             }
         }
     } else {
         $tmp = array();
         if (!empty($search)) {
             $base = '';
             if ($start > 0) {
                 $base = '(c.category_left <= ' . (int) $categories[$start]->category_left . ' AND c.category_right >= ' . (int) $categories[$start]->category_right . ') AND ';
             }
             $lookup_categories = array();
             foreach ($categories as $c) {
                 if (empty($lookup_categories[(int) $c->category_id])) {
                     $lookup_categories[(int) $c->category_id] = (int) $c->category_left . ' AND c.category_right > ' . (int) $c->category_right;
                 }
             }
             $query = 'SELECT c.* ' . ' FROM ' . hikashop_table('category') . ' AS c ' . ' WHERE ' . $base . '((c.category_left < ' . implode(') OR (c.category_left < ', $lookup_categories) . '))' . $order;
             $db->setQuery($query);
             if (!$app->isAdmin() && $multiTranslation && class_exists('JFalangDatabase')) {
                 $category_tree = $db->loadObjectList('category_id', 'stdClass', false);
             } elseif (!$app->isAdmin() && $multiTranslation && (class_exists('JFDatabase') || class_exists('JDatabaseMySQLx'))) {
                 $category_tree = $db->loadObjectList('category_id', false);
             } else {
                 $category_tree = $db->loadObjectList('category_id');
             }
             foreach ($category_tree as $k => $v) {
                 if ($k == $start) {
                     continue;
                 }
                 $o = new stdClass();
                 $o->status = 2;
                 $o->name = JText::_($v->category_name);
                 $o->value = $k;
                 $o->data = array();
                 if (empty($v->category_parent_id)) {
                     $o->status = 5;
                     $o->icon = 'world';
                     $ret[0][] =& $o;
                 } else {
                     if ((int) $v->category_parent_id == 1 || !isset($tmp[(int) $v->category_parent_id])) {
                         $ret[0][] =& $o;
                     } else {
                         $tmp[(int) $v->category_parent_id]->data[] =& $o;
                     }
                 }
                 $tmp[$k] =& $o;
                 unset($o);
             }
         }
         foreach ($categories as $k => $v) {
             if ($k == $start) {
                 continue;
             }
             $o = new stdClass();
             if ($v->category_left + 1 == $v->category_right) {
                 $o->status = 4;
             } else {
                 $o->status = 3;
             }
             $o->name = !empty($v->translation) ? $v->translation : JText::_($v->category_name);
             $o->value = $k;
             $o->data = array();
             if (empty($v->category_parent_id)) {
                 $o->status = 5;
                 $o->icon = 'world';
                 $ret[0][] =& $o;
             } else {
                 if ((int) $v->category_parent_id == 1 || !isset($tmp[(int) $v->category_parent_id])) {
                     $ret[0][] =& $o;
                 } else {
                     $tmp[(int) $v->category_parent_id]->status = 2;
                     $tmp[(int) $v->category_parent_id]->data[] =& $o;
                 }
             }
             $tmp[$k] =& $o;
             unset($o);
         }
     }
     if (!empty($value) && @$typeConfig['params']['category_type'] == 'status') {
         if ($mode == hikashopNameboxType::NAMEBOX_SINGLE && isset($ret[0][$value])) {
             $ret[1][$value] = $ret[0][$value];
             return $ret;
         }
         if ($mode == hikashopNameboxType::NAMEBOX_MULTIPLE && is_array($value)) {
             foreach ($value as $v) {
                 if (isset($ret[0][$v])) {
                     $ret[1][$v] = $ret[0][$v];
                 }
             }
             return $ret;
         }
     }
     if (!empty($value)) {
         if (!is_array($value)) {
             $value = array($value);
         }
         $search = array();
         $f = reset($value);
         if (is_int($f) || (int) $f > 0) {
             foreach ($value as $v) {
                 $search[] = (int) $v;
             }
             $query = 'SELECT c.* ' . ' FROM ' . hikashop_table('category') . ' AS c ' . ' WHERE c.category_id IN (' . implode(',', $search) . ')';
         } else {
             foreach ($value as $v) {
                 $search[] = $db->Quote($v);
             }
             $query = 'SELECT c.* ' . ' FROM ' . hikashop_table('category') . ' AS c ' . ' WHERE c.category_name IN (' . implode(',', $search) . ')';
         }
         $db->setQuery($query);
         if (!$app->isAdmin() && $multiTranslation && class_exists('JFalangDatabase')) {
             $categories = $db->loadObjectList('category_id', 'stdClass', false);
         } elseif (!$app->isAdmin() && $multiTranslation && (class_exists('JFDatabase') || class_exists('JDatabaseMySQLx'))) {
             $categories = $db->loadObjectList('category_id', false);
         } else {
             $categories = $db->loadObjectList('category_id');
         }
         if (!empty($categories)) {
             if (!empty($options['tooltip'])) {
                 $parent_categories = array();
                 foreach ($categories as $category) {
                     $pid = (int) $category->category_parent_id;
                     $parent_categories[$pid] = $pid;
                 }
                 $query = 'SELECT c.* ' . ' FROM ' . hikashop_table('category') . ' AS c ' . ' INNER JOIN ' . hikashop_table('category') . ' AS cp ON (c.category_left <= cp.category_left AND c.category_right >= cp.category_left) ' . ' WHERE cp.category_id IN (' . implode(',', $parent_categories) . ') AND c.category_id > 1';
                 $db->setQuery($query);
                 if (!$app->isAdmin() && $multiTranslation && class_exists('JFalangDatabase')) {
                     $parent_categories = $db->loadObjectList('category_id', 'stdClass', false);
                 } elseif (!$app->isAdmin() && $multiTranslation && (class_exists('JFDatabase') || class_exists('JDatabaseMySQLx'))) {
                     $parent_categories = $db->loadObjectList('category_id', false);
                 } else {
                     $parent_categories = $db->loadObjectList('category_id');
                 }
             }
             $orderedList = array();
             foreach ($value as $v) {
                 $orderedList[$v] = $categories[$v];
             }
             $categories = $orderedList;
             foreach ($categories as $category) {
                 $category->category_name = !empty($category->translation) ? $category->translation : JText::_($category->category_name);
                 if (!empty($options['tooltip'])) {
                     $tree = array();
                     $pid = (int) $category->category_parent_id;
                     while (!empty($pid)) {
                         if (isset($parent_categories[$pid])) {
                             array_unshift($tree, !empty($parent_categories[$pid]->translation) ? $parent_categories[$pid]->translation : JText::_($parent_categories[$pid]->category_name));
                             $pid = (int) $parent_categories[$pid]->category_parent_id;
                         } else {
                             $pid = 0;
                         }
                     }
                     if (!empty($tree)) {
                         $tree[] = $category->category_name;
                         $category->category_name = hikashop_tooltip(implode(' / ', $tree), '', '', $category->category_name, '', 0);
                     }
                 }
                 $category->name = $category->category_name;
                 $ret[1][$category->category_id] = $category;
             }
         }
         unset($categories);
         if ($mode == hikashopNameboxType::NAMEBOX_SINGLE) {
             $ret[1] = reset($ret[1]);
         }
     }
     return $ret;
 }
Beispiel #10
0
    ?>
"/>
				</div>
				<div class="input-prepend">
					<span class="add-on"><?php 
    echo str_replace('#MYTEXT#', '<i class="icon-14-width"></i>', hikashop_tooltip(JText::_('PRODUCT_WIDTH'), '', '', '#MYTEXT#', '', 0));
    ?>
</span>
					<input size="10" style="width:50px" type="text" name="data[variant][product_width]" value="<?php 
    echo $this->escape(@$this->product->product_width);
    ?>
"/>
				</div>
				<div class="input-prepend">
					<span class="add-on"><?php 
    echo str_replace('#MYTEXT#', '<i class="icon-14-height"></i>', hikashop_tooltip(JText::_('PRODUCT_HEIGHT'), '', '', '#MYTEXT#', '', 0));
    ?>
</span>
					<input size="10" style="width:50px" type="text" name="data[variant][product_height]" value="<?php 
    echo $this->escape(@$this->product->product_height);
    ?>
"/>
				</div>
				<?php 
    echo $this->volume->display('data[variant][product_dimension_unit]', @$this->product->product_dimension_unit, 'dimension', '', 'class="no-chzn" style="width:70px;"');
    ?>
			</dd>
<?php 
}
?>
		</dl>
Beispiel #11
0
				<?php 
if (!isset($this->element['number_of_products'])) {
    $this->element['number_of_products'] = '-1';
}
echo JHTML::_('hikaselect.inheritRadiolist', $this->name . '[number_of_products]', $this->element['number_of_products']);
?>
			</dd>
		</dl>
		<dl class="hika_options">
			<dt class="hikashop_option_name">
				<label for="data_menu__<?php 
echo $this->type;
?>
_only_if_products">
					<?php 
echo hikashop_tooltip(JText::_('ONLY_DISPLAY_CATEGORIES_WITH_PRODUCTS'), '', '', JText::_('HIKA_ONLY_WITH_PRODUCTS'), '', 0);
?>
				</label>
			</dt>
			<dd class="hikashop_option_value">
				<?php 
if (!isset($this->element['only_if_products'])) {
    $this->element['only_if_products'] = '-1';
}
echo JHTML::_('hikaselect.inheritRadiolist', $this->name . '[only_if_products]', $this->element['only_if_products']);
?>
			</dd>
		</dl>
	</div>
</div>
Beispiel #12
0
        ?>
</th>
<?php 
    }
    if ($acls['quantity']) {
        ?>
			<th class="title"><?php 
        echo hikashop_tooltip(JText::_('MINIMUM_QUANTITY'), '', '', JText::_('MIN_QTY'), '', 0);
        ?>
</th>
<?php 
    }
    if (hikashop_level(2) && $acls['acl']) {
        ?>
			<th class="title"><?php 
        echo hikashop_tooltip(JText::_('ACCESS_LEVEL'), '', '', JText::_('ACL'), '', 0);
        ?>
</th>
<?php 
    }
    if ($jms_integration) {
        ?>
			<th class="title"><?php 
        echo JText::_('SITE_ID');
        ?>
</th>
<?php 
    }
    ?>
			<th></th>
		</tr>