本文整理汇总了PHP中hikashop_getLayout函数的典型用法代码示例。如果您正苦于以下问题:PHP hikashop_getLayout函数的具体用法?PHP hikashop_getLayout怎么用?PHP hikashop_getLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hikashop_getLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
protected function getInput()
{
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!function_exists('hikashop_config') && !(include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php')) {
return 'This menu options cannot be displayed without the Hikashop Component';
}
$id = JRequest::getInt('id');
if (HIKASHOP_J30) {
$empty = '';
jimport('joomla.html.parameter');
$params = new HikaParameter($empty);
$js = '';
$params->set('id', $this->id);
$params->set('name', $this->name);
$params->set('value', $this->value);
$params->set('type', $this->getAttribute('content'));
$params->set('menu', $this->getAttribute('menu'));
$content = hikashop_getLayout('menus', 'options', $params, $js);
$text = '</div></div>' . $content . '<div><div>';
} elseif (!empty($id)) {
$config =& hikashop_config();
if (!hikashop_isAllowed($config->get('acl_menus_manage', 'all'))) {
return 'Access to the HikaShop options of the menus is restricted';
}
$text = '<a title="' . JText::_('HIKASHOP_OPTIONS') . '" href="' . JRoute::_('index.php?option=com_hikashop&ctrl=menus&fromjoomla=1&task=edit&cid[]=' . $id) . '" >' . JText::_('HIKASHOP_OPTIONS') . '</a>';
} else {
$text = JText::_('HIKASHOP_OPTIONS_EDIT');
}
return $text;
}
示例2: getInput
protected function getInput()
{
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
if (!function_exists('hikashop_config') && !(include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php')) {
return 'This module can not work without the Hikashop Component';
}
$config =& hikashop_config();
$id = JRequest::getInt('id');
if (HIKASHOP_J30 && !in_array(@$_REQUEST['option'], array('com_falang', 'com_joomfish'))) {
if (preg_match('/hikashopmodule/', $this->name)) {
$associated = false;
$cid = JRequest::getVar('id', '');
if (empty($cid)) {
$cid = hikashop_getCID();
}
foreach ($config->values as $name => $values) {
if (preg_match('#menu_[0-9]#', $name)) {
$params = unserialize(base64_decode($values->config_value));
$modules = array();
if (isset($params['modules'])) {
$modules = explode(',', $params['modules']);
}
if (in_array($cid, $modules)) {
$associated = str_replace('menu_', '', $values->config_namekey);
break;
}
}
}
if ($associated) {
$app = JFactory::getApplication();
$app->enqueueMessage(JText::sprintf('USE_MENU_SETTINGS_INSTEAD_OF_ASSOCIATED_ONES', JRoute::_('index.php?option=com_menus&view=item&layout=edit&id=' . $associated)));
}
$layout = 'modules';
} else {
$layout = 'cartmodules';
}
$empty = '';
jimport('joomla.html.parameter');
$params = new HikaParameter($empty);
$js = '';
$params->set('id', $this->id);
$params->set('name', $this->name);
$params->set('value', $this->value);
$content = hikashop_getLayout($layout, 'options', $params, $js, true);
$text = '</div></div>' . $content . '<div><div>';
} elseif (!empty($id)) {
if (!hikashop_isAllowed($config->get('acl_modules_manage', 'all'))) {
return 'Access to the HikaShop options of the modules is restricted';
}
$text = '<a style="float:left;" title="' . JText::_('HIKASHOP_OPTIONS') . '" href="' . JRoute::_('index.php?option=com_hikashop&ctrl=modules&fromjoomla=1&task=edit&cid[]=' . $id) . '" >' . JText::_('HIKASHOP_OPTIONS') . '</a>';
} else {
$text = JText::_('HIKASHOP_OPTIONS_EDIT');
}
return $text;
}
示例3: showoptions
function showoptions()
{
$js = '';
jimport('joomla.html.parameter');
$params = new hikaParameter();
$params->set('id', JRequest::getVar('id', 'product'));
$params->set('name', JRequest::getVar('id', 'product'));
$value = unserialize(JRequest::getVar('value'));
$value['content_type'] = JRequest::getVar('content_type', 'product');
$params->set('value', $value);
echo hikashop_getLayout('modules', 'options', $params, $js);
}
示例4: display
function display($cachable = false, $urlparams = array())
{
$cart_type = JRequest::getString('cart_type', 'cart');
$empty = '';
jimport('joomla.html.parameter');
$params = new HikaParameter($empty);
$js = '';
$params->set('cart_type', $cart_type);
$html = trim(hikashop_getLayout('product', 'cart', $params, $js));
if (!empty($html)) {
JRequest::setVar('savecart', '1');
echo '<div class="hikashop_cart_display" id="hikashop_cart_display">' . $html . '</div>';
}
}
示例5: show
function show()
{
$data_id = JRequest::getVar('data_id', 0, 'default', 'int');
$data_type = JRequest::getVar('main_ctrl', 'product', 'default', 'string', 0);
$empty = $js = '';
jimport('joomla.html.parameter');
$params = new HikaParameter($empty);
$params->set('vote_ref_id', $data_id);
$params->set('main_ctrl', $data_type);
$params->set('vote_type', $data_type);
ob_get_clean();
echo hikashop_getLayout('vote', 'listing', $params, $js);
exit;
}
示例6: stdClass
?>
</div>
<div id="hikashop_checkout_<?php
echo $this->type;
?>
_address_zone">
<?php
if (empty($this->addresses)) {
$js = '';
$params = new stdClass();
$params->type = $this->type;
$params->address_id = 0;
//(int)$address->address_id;
$params->edit = true;
$params->fieldset_id = 'hikashop_checkout_' . $this->type . '_address_zone';
echo hikashop_getLayout('address', 'show', $params, $js);
}
?>
</div>
<?php
static $hikashop_address_select_once = false;
if (!$hikashop_address_select_once) {
$hikashop_address_select_once = true;
?>
<script type="text/javascript">
if(!window.localPage) window.localPage = {};
window.localPage.switchAddr = function(el, type) {
var d = document, w = window, o = w.Oby, target = d.getElementById('hikashop_checkout_selected_' + type + '_address');
if(el === 0 || el.value == '0') {
if(target)
示例7: upload
public function upload()
{
JRequest::checkToken() || die('Invalid Token');
$this->initController();
$config = hikashop_config();
$upload_key = JRequest::getVar('field', '');
if (empty($this->base_controller)) {
exit;
}
$uploadConfig = $this->base_controller->getUploadSetting($upload_key, 'upload');
if ($uploadConfig === false) {
header('HTTP/1.1 403 Forbidden');
exit;
}
$layout = 'upload';
if (!empty($uploadConfig['layout'])) {
$layout = $uploadConfig['layout'];
}
$viewName = '';
if (!empty($uploadConfig['view'])) {
$viewName = $uploadConfig['view'];
}
$type = 'image';
if (!empty($uploadConfig['type'])) {
$type = $uploadConfig['type'];
}
$options = array();
if (!empty($uploadConfig['options'])) {
$options = $uploadConfig['options'];
}
$extra_data = array();
if (!empty($uploadConfig['extra'])) {
$extra_data = $uploadConfig['extra'];
}
if (empty($extra_data['field'])) {
$extra_data['field'] = $upload_key;
}
if (empty($viewName)) {
$viewName = $type == 'image' ? 'image_entry' : 'file_entry';
}
$this->processUploadOption($options, $type);
if (empty($options) || empty($options['upload_dir'])) {
return false;
}
$max_width = (int) $config->get('max_image_size_width', 0);
$max_height = (int) $config->get('max_image_size_height', 0);
$uploadHelper = hikashop_get('helper.upload');
$ret = $uploadHelper->process($options);
if ($ret !== false && empty($ret->error) && empty($ret->partial)) {
$helperImage = null;
if ($type == 'image') {
$helperImage = hikashop_get('helper.image');
}
$file = new stdClass();
$file->file_description = '';
$file->file_name = $ret->name;
$file->file_type = $type;
$file->file_path = $options['sub_folder'] . $r->name;
$file->file_url = $options['upload_url'] . $options['sub_folder'];
foreach ($extra_data as $k => $v) {
$file->{$k} = $v;
}
if (strpos($file->file_name, '.') !== false) {
$file->file_name = substr($file->file_name, 0, strrpos($file->file_name, '.'));
}
$ret->file = $file;
$ret->html = '';
$js = '';
if ($type == 'image') {
if ($max_height > 0 || $max_width > 0) {
}
$img = $helperImage->getThumbnail($file->file_path, array(100, 100), array('default' => true));
$ret->thumbnail_url = $img->url;
$params = new stdClass();
$params->file_path = $file->file_path;
$params->file_name = $file->file_name;
$params->file_url = $file->file_url;
} else {
$params = new stdClass();
$params->file_name = $file->file_name;
$params->file_path = $file->file_path;
$params->file_url = $file->file_url;
$params->file_limit = -1;
$params->file_size = @filesize($options['upload_dir'] . $options['sub_folder'] . $file->file_name);
}
foreach ($extra_data as $k => $v) {
$params->{$k} = $v;
}
$ret->params = $params;
$this->base_controller->manageUpload($upload_key, $ret, $uploadConfig, 'upload');
if (empty($r->html)) {
$ret->html = hikashop_getLayout($layout, $viewName, $ret->params, $js);
}
}
unset($ret->path);
unset($ret->params);
echo json_encode($ret);
exit;
}
示例8: store
static function store($config, $item)
{
$html = '<div class="nspHikashopBlock">';
//
$currencyHelper = hikashop_get('class.currency');
$mainCurr = $currencyHelper->mainCurrency();
$app = JFactory::getApplication();
$currCurrency = $app->getUserState(HIKASHOP_COMPONENT . '.currency_id', $mainCurr);
$msrpCurrencied = $currencyHelper->convertUniquePrice($item['product_msrp'], $mainCurr, $currCurrency);
if ($msrpCurrencied == $item['product_msrp']) {
$html .= '<span>' . $currencyHelper->format($item['product_msrp'], $mainCurr) . '</span>';
} else {
$html .= '<span>' . $currencyHelper->format($msrpCurrencied, $currCurrency) . ' (' . $currencyHelper->format($item['product_msrp'], $mainCurr) . ')' . '</span>';
}
if ($config['hikashop_add_to_cart'] > 0) {
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php';
JHTML::_('behavior.framework');
$hs_config = hikashop_config();
$productClass = hikashop_get('class.product');
$_SESSION['hikashop_product'] = $productClass->get($item['id']);
$params = new JRegistry('');
// enable quantity field
if ($config['hikashop_add_to_cart'] == 2) {
$params->set('show_quantity_field', 1);
} else {
$params->set('show_quantity_field', 0);
}
$params->set('price_with_tax', $hs_config->get('price_with_tax', 1));
$params->set('add_to_cart', 1);
$js = '';
$html .= hikashop_getLayout('product', 'add_to_cart_listing', $params, $js);
}
$html .= '</div>';
return $html;
}
示例9: defined
*/
defined('_JEXEC') or die('Restricted access');
hikashop_loadJslib('jquery');
$js = '';
$params = null;
$this->params->set('vote_type', 'product');
if (isset($this->element->main)) {
$product_id = $this->element->main->product_id;
} else {
$product_id = $this->element->product_id;
}
$this->params->set('vote_ref_id', $product_id);
$this->params->set('productlayout', 'show_tabular');
$layout_vote_mini = hikashop_getLayout('vote', 'mini', $this->params, $js);
$layout_vote_listing = hikashop_getLayout('vote', 'listing', $this->params, $js);
$layout_vote_form = hikashop_getLayout('vote', 'form', $this->params, $js);
$config =& hikashop_config();
$status_vote = $config->get('enable_status_vote');
$hide_specs = 1;
if ($this->element->product_manufacturer_id != 0 || $this->element->product_weight != 0 || $this->element->product_width != 0 || $this->element->product_height != 0 || $this->element->product_length != 0 || @$this->element->main->product_weight != 0 || @$this->element->main->product_width != 0 || @$this->element->main->product_height != 0 || @$this->element->main->product_length != 0) {
$hide_specs = 0;
}
foreach ($this->fields as $fieldName => $oneExtraField) {
$value = '';
if (empty($this->element->{$fieldName}) && !empty($this->element->main->{$fieldName})) {
$this->element->{$fieldName} = $this->element->main->{$fieldName};
}
if (isset($this->element->{$fieldName})) {
$value = trim($this->element->{$fieldName});
}
if (!empty($value)) {
示例10: hikashop_getLayout
?>
">
<fieldset class="input">
<h2 id="hika_registration_type"><?php
if ($this->registration[2] && $registration_count == 1) {
echo JText::_('GUEST');
} else {
echo JText::_('HIKA_REGISTRATION');
}
?>
</h2>
<?php
$usersConfig = JComponentHelper::getParams('com_users');
$allowRegistration = $usersConfig->get('allowUserRegistration');
if ($allowRegistration || $this->registration[2]) {
echo hikashop_getLayout('user', 'registration', $params, $js);
} else {
echo JText::_('REGISTRATION_NOT_ALLOWED');
}
?>
</fieldset>
</div>
<?php
if ($display_login) {
?>
<div id="hikashop_checkout_login_form" class=" <?php
echo $classLogin;
?>
">
<fieldset class="input">
<h2><?php
示例11: form
//.........这里部分代码省略.........
$task = 'edit';
} else {
$element = new stdClass();
$element->widget_published = 1;
$task = 'add';
$element->widget_params = new stdClass();
$element->widget_params->display = 'line';
$element->widget_params->content = 'sales';
$element->widget_params->date_group = '%j %Y';
$element->widget_params->date_type = 'created';
$element->widget_params->periodType = 'proposedPeriod';
$element->widget_params->proposedPeriod = 'thisMonth';
$element->widget_params->format = 'UTF-8';
$element->widget_params->period_compare = 'none';
$element->widget_name = 'New report ' . $widget_id;
$element->widget_params->limit = '7';
}
$class->loadDatas($element);
if (isset($element->widget_params->table)) {
$row_id = count($element->widget_params->table);
$this->assignRef('row_id', $row_id);
foreach ($element->widget_params->table as $row) {
$class->loadDatas($row);
}
} else {
$row_id = 0;
$this->assignRef('row_id', $row_id);
}
if ($element->widget_params->display != 'table') {
if ($element->widget_params->display != 'listing' && ($element->widget_params->content == 'products' || $element->widget_params->content == 'categories' || $element->widget_params->content == 'discount')) {
$element->widget_params->content = 'orders';
}
}
hikashop_setTitle(JText::_($this->nameForm), $this->icon, $this->ctrl . '&task=' . $task . '&widget_id=' . $widget_id);
$this->toolbar = array(array('name' => 'link', 'icon' => 'archive', 'alt' => JText::_('HIKA_EXPORT'), 'url' => hikashop_completeLink('report&task=csv&cid[]=' . $widget_id) . '&' . hikashop_getFormToken() . '=1', 'display' => hikashop_level(2) && !empty($widget_id) && hikashop_isAllowed($config->get('acl_report_view', 'all'))), '|', array('name' => 'save', 'display' => hikashop_isAllowed($config->get('acl_report_manage', 'all'))), array('name' => 'save2new', 'display' => version_compare(JVERSION, '1.7', '>=') && hikashop_isAllowed($config->get('acl_report_manage', 'all'))), array('name' => 'apply', 'display' => hikashop_isAllowed($config->get('acl_report_manage', 'all'))), 'cancel', '|', array('name' => 'pophelp', 'target' => $this->ctrl . '-form'));
$this->assignRef('element', $element);
$translation = false;
$transHelper = hikashop_get('helper.translation');
if ($transHelper && $transHelper->isMulti()) {
$translation = true;
$transHelper->load('hikashop_widget', @$element->widget_id, $element);
$config =& hikashop_config();
$multilang_display = $config->get('multilang_display', 'tabs');
if ($multilang_display == 'popups') {
$multilang_display = 'tabs';
}
$tabs = hikashop_get('helper.tabs');
$this->assignRef('tabs', $tabs);
$this->assignRef('transHelper', $transHelper);
}
$toggle = hikashop_get('helper.toggle');
$this->assignRef('toggle', $toggle);
$this->assignRef('translation', $translation);
$currencyClass = hikashop_get('class.currency');
$this->assignRef('currencyHelper', $currencyClass);
$periodType = hikashop_get('type.period');
$this->assignRef('periodType', $periodType);
$widget_dataType = hikashop_get('type.widget_data');
$this->assignRef('widget_dataType', $widget_dataType);
$status = hikashop_get('type.categorysub');
$status->type = 'status';
$this->assignRef('status', $status);
$delay = hikashop_get('type.delay');
$this->assignRef('delay', $delay);
$region = hikashop_get('type.region');
$this->assignRef('region', $region);
if (hikashop_level(2)) {
$encoding = hikashop_get('type.charset');
$this->assignRef('encoding', $encoding);
}
$widgetClass = hikashop_get('class.widget');
$this->assignRef('widgetClass', $widgetClass);
$dateGroup = hikashop_get('type.dategroup');
$this->assignRef('dateGroup', $dateGroup);
$dateType = hikashop_get('type.datetype');
$this->assignRef('dateType', $dateType);
$shippingMethods = hikashop_get('type.plugins');
$shippingMethods->type = 'shipping';
$shippingMethods->manualOnly = true;
$this->assignRef('shippingMethods', $shippingMethods);
$paymentMethods = hikashop_get('type.plugins');
$paymentMethods->type = 'payment';
$paymentMethods->manualOnly = true;
$this->assignRef('paymentMethods', $paymentMethods);
$dashboard = JRequest::getVar('dashboard');
$this->assignRef('dashboard', $dashboard);
$nameboxType = hikashop_get('type.namebox');
$this->assignRef('nameboxType', $nameboxType);
JHTML::_('behavior.modal');
$script = "\r\n\tfunction deleteRow(divName,inputName,rowName){\r\n\t\tvar d = document.getElementById(divName);\r\n\t\tvar olddiv = document.getElementById(inputName);\r\n\t\tif(d && olddiv){\r\n\t\t\td.removeChild(olddiv);\r\n\t\t\tdocument.getElementById(rowName).style.display='none';\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction updatePeriodSelection(){\r\n\t\tselectedPeriod = document.getElementById('display_proposed_period').checked;\r\n\t\tdocument.getElementById('period_start').disabled=false;\r\n\t\tdocument.getElementById('period_end').disabled=false;\r\n\t\tdocument.getElementById('delayvalue1').disabled=false;\r\n\t\tdocument.getElementById('delaytype1').disabled=false;\r\n\t\tdocument.getElementById('datawidgetwidget_paramsproposedPeriod').disabled=false;\r\n\t\tif(selectedPeriod==true){\r\n\t\t\tdocument.getElementById('period_start').disabled=true;\r\n\t\t\tdocument.getElementById('period_end').disabled=true;\r\n\t\t\tdocument.getElementById('delayvalue1').disabled=true;\r\n\t\t\tdocument.getElementById('delaytype1').disabled=true;\r\n\t\t}else{\r\n\t\t\tdocument.getElementById('datawidgetwidget_paramsproposedPeriod').disabled=true;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateCompare(){\r\n\t\tselectedCompare = document.getElementById('compare_with_values').checked;\r\n\t\tdocument.getElementById('compares_order_status').disabled=false;\r\n\t\tdocument.getElementById('compares_order_currency_id').disabled=false;\r\n\t\tdocument.getElementById('compares_order_payment_method').disabled=false;\r\n\t\tdocument.getElementById('compares_order_shipping_method').disabled=false;\r\n\t\tdocument.getElementById('compares_order_discount_code').disabled=false;\r\n\t\tdocument.getElementById('compares_products').disabled=false;\r\n\t\tdocument.getElementById('compares_categories').disabled=false;\r\n\t\tdocument.getElementById('compare_period').disabled=false;\r\n\t\tif(selectedCompare==true){\r\n\t\t\tdocument.getElementById('compare_period').disabled=true;\r\n\t\t}else{\r\n\t\t\tdocument.getElementById('compares_order_status').disabled=true;\r\n\t\t\tdocument.getElementById('compares_order_currency_id').disabled=true;\r\n\t\t\tdocument.getElementById('compares_order_payment_method').disabled=true;\r\n\t\t\tdocument.getElementById('compares_order_shipping_method').disabled=true;\r\n\t\t\tdocument.getElementById('compares_order_discount_code').disabled=true;\r\n\t\t\tdocument.getElementById('compares_products').disabled=true;\r\n\t\t\tdocument.getElementById('compares_categories').disabled=true;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateDisplayType(){\r\n\t\ttheType=false;\r\n\t\tvalues = new Array('gauge', 'column', 'graph', 'line', 'pie', 'area', 'map', 'listing', 'table');\r\n\t\tfor(var i=0; i<values.length; i++){\r\n\t\t\tnewType = document.getElementById('widget_display_'+values[i]).checked;\r\n\t\t\tif(newType==true){\r\n\t\t\t\tdisplayType = document.getElementById('widget_display_'+values[i]).value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(displayType=='pie'){\r\n\t\t\tvalues = new Array('orders', 'sales', 'taxes', 'partners', 'customers');\r\n\t\t\tfor(var i=0; i<values.length; i++){\r\n\t\t\t\tnewType = document.getElementById('type_'+values[i]).checked;\r\n\t\t\t\tif(newType==true){\r\n\t\t\t\t\t\ttheType = document.getElementById('type_'+values[i]).value;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(theType=='customers' || theType=='partners'){\r\n\t\t\t\t document.getElementById('type_orders').checked=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(displayType=='map'){\r\n\t\t\tvalues = new Array('orders', 'sales', 'taxes', 'partners', 'customers');\r\n\t\t\tfor(var i=0; i<values.length; i++){\r\n\t\t\t\tnewType = document.getElementById('type_'+values[i]).checked;\r\n\t\t\t\tif(newType==true){\r\n\t\t\t\t\ttheType = document.getElementById('type_'+values[i]).value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdocument.getElementById('map_options').style.display='none';\r\n\t\t\tdocument.getElementById('filters').style.display='';\r\n\t\t\tif(theType=='orders' || theType=='sales' || theType=='taxes'){\r\n\t\t\t\tdocument.getElementById('map_options').style.display='';\r\n\t\t\t}\r\n\t\t\tif(theType=='customers' || theType=='partners'){\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(displayType=='gauge' || displayType=='line' || displayType=='area' || displayType=='graph' || displayType=='column'){\r\n\t\t\tvalues = new Array('orders', 'sales', 'taxes', 'partners', 'customers');\r\n\t\t\tfor(var i=0; i<values.length; i++){\r\n\t\t\t\tnewType = document.getElementById('type_'+values[i]).checked;\r\n\t\t\t\tif(newType==true){\r\n\t\t\t\t\t\ttheType = document.getElementById('type_'+values[i]).value;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(theType==false){\r\n\t\t\t\ttheType='orders';\r\n\t\t\t \ttheType = document.getElementById('type_orders').checked=true;\r\n\t\t\t}\r\n\t\t\tdocument.getElementById('widget_compare').style.display='';\r\n\t\t\tif(theType=='orders' || theType=='sales' || theType=='taxes'){\r\n\t\t\t\tdocument.getElementById('widget_compare').style.display='';\r\n\t\t\t}\r\n\t\t\tif(theType=='customers' || theType=='partners'){\r\n\t\t\t\tdocument.getElementById('widget_compare').style.display='none';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(displayType=='table'){\r\n\t\t\tdocument.getElementById('products_options').style.display='none';\r\n\t\t\tdocument.getElementById('filters').style.display='none';\r\n\t\t\tdocument.getElementById('customers_options').style.display='none';\r\n\t\t\tdocument.getElementById('partners_options').style.display='none';\r\n\t\t\tdocument.getElementById('orders_options').style.display='none';\r\n\t\t\tdocument.getElementById('product_datas').style.display='none';\r\n\t\t\tdocument.getElementById('widget_compare').style.display='none';\r\n\t\t\tdocument.getElementById('widget_limit').style.display='none';\r\n\t\t\tdocument.getElementById('widget_region').style.display='none';\r\n\t\t\tdocument.getElementById('map_options').style.display='none';\r\n\t\t}\r\n\t\tif(displayType!='listing'){ return 0; }\r\n\r\n\t\tvalues = new Array('orders', 'products', 'customers', 'partners', 'categories', 'discounts');\r\n\t\tfor(var i=0; i<values.length; i++){\r\n\t\t\tnewType = document.getElementById('type_'+values[i]).checked;\r\n\t\t\tif(newType==true){\r\n\t\t\t\ttheType = document.getElementById('type_'+values[i]).value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!theType){\r\n\t\t\tdocument.getElementById('type_orders').checked=true;\r\n\t\t\ttheType='orders';\r\n\t\t}\r\n\t\tdocument.getElementById('products_options').style.display='none';\r\n\t\tdocument.getElementById('filters').style.display='none';\r\n\t\tdocument.getElementById('customers_options').style.display='none';\r\n\t\tdocument.getElementById('partners_options').style.display='none';\r\n\t\tdocument.getElementById('orders_options').style.display='none';\r\n\t\tdocument.getElementById('product_datas').style.display='none';\r\n\r\n\t\tif(theType=='orders' || theType=='products' || theType=='categories' || theType=='discounts' || theType=='customers' || theType== 'partners'){\r\n\t\t\tdocument.getElementById('filters').style.display='';\r\n\t\t\tdocument.getElementById('product_datas').style.display='';\r\n\t\t\tif(theType=='categories'){\r\n\t\t\t\tdocument.getElementById('data_hits').style.display='none';\r\n\t\t\t\tclicksValue = document.getElementById('data_clicks').checked;\r\n\t\t\t\tif(clicksValue==true){\r\n\t\t\t\t\tdocument.getElementById('data_orders').checked=true;\r\n\t\t\t\t}\r\n\t\t\t}else if(theType=='products'){\r\n\t\t\t\tdocument.getElementById('data_hits').style.display='';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(theType=='discounts'){\r\n\t\t\tdocument.getElementById('product_datas').style.display='none';\r\n\t\t}\r\n\t\tif(theType=='products' || theType=='categories' || theType=='discounts'){\r\n\t\t\tdocument.getElementById('products_options').style.display='';\r\n\t\t}\r\n\t\tif(theType=='customers'){\r\n\t\t\tdocument.getElementById('customers_options').style.display='';\r\n\t\t}\r\n\t\tif(theType=='partners'){\r\n\t\t\tdocument.getElementById('partners_options').style.display='';\r\n\t\t}\r\n\t\tif(theType=='orders'){\r\n\t\t\tdocument.getElementById('orders_options').style.display='';\r\n\t\t}\r\n\r\n\t}\r\n\twindow.hikashop.ready( function(){ updateDisplayType(); });\r\n\twindow.hikashop.ready( function(){ updatePeriodSelection(); });\r\n\twindow.hikashop.ready( function(){ updateCompare(); });\r\n\r\n\t\t\t\t";
if (!HIKASHOP_PHP5) {
$doc =& JFactory::getDocument();
} else {
$doc = JFactory::getDocument();
}
$doc->addScriptDeclaration($script);
$js = '';
$params = $element;
echo hikashop_getLayout('dashboard', 'widget', $params, $js);
}
示例12: foreach
<?php
}
if (!empty($cid)) {
?>
<div id="div_module_content" class="row-fluid">
<fieldset id="module_content" class="adminform">
<legend><?php
echo JText::_('ASSOCIATED_MODULES');
?>
</legend>
<?php
foreach ($cid as $element) {
echo "<fieldset id=\"module_content_" . $element->id . "\">";
echo '<legend>' . $element->title . '</legend>';
$js = '';
echo hikashop_getLayout('modules', 'form', $element->id, $js);
echo "</fieldset>";
}
?>
</fieldset>
</div>
<?php
}
?>
<div class="clr"></div>
<input type="hidden" name="option" value="<?php
echo HIKASHOP_COMPONENT;
?>
" />
<input type="hidden" name="menu[id]" value="<?php
示例13: displayAddress
function displayAddress(&$fields, &$address, $view = 'address', $text = false)
{
$params = new HikaParameter('');
if (HIKASHOP_J25) {
$params->set('address', $address);
}
$js = '';
$fieldsClass = hikashop_get('class.field');
$html = '' . hikashop_getLayout($view, 'address_template', $params, $js);
if (!empty($fields)) {
foreach ($fields as $field) {
$fieldname = $field->field_namekey;
if (!empty($address->{$fieldname})) {
$html = str_replace('{' . $fieldname . '}', $fieldsClass->show($field, $address->{$fieldname}), $html);
}
}
}
$html = str_replace("\n\n", "\n", trim(str_replace("\r\n", "\n", trim(preg_replace('#{(?:(?!}).)*}#i', '', $html))), "\n"));
if (!$text) {
$html = str_replace("\n", "<br/>\n", $html);
}
return $html;
}
示例14: hikashop_getLayout
</span>
<div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini">
<?php
if ($this->params->get('show_vote_product') == '-1') {
$this->params->set('show_vote_product', $config->get('show_vote_product'));
}
if ($this->params->get('show_vote_product')) {
$js = '';
$this->params->set('vote_type', 'product');
if (isset($this->element->main)) {
$product_id = $this->element->main->product_id;
} else {
$product_id = $this->element->product_id;
}
$this->params->set('vote_ref_id', $product_id);
echo hikashop_getLayout('vote', 'mini', $this->params, $js);
}
?>
</div>
<?php
if (!empty($this->element->extraData->rightMiddle)) {
echo implode("\r\n", $this->element->extraData->rightMiddle);
}
?>
<?php
$this->setLayout('show_block_dimensions');
echo $this->loadTemplate();
?>
</span><br />
<?php
if ($this->params->get('characteristic_display') != 'list') {
示例15: updatecart
//.........这里部分代码省略.........
if (empty($module_options)) {
$module_options = $config->get('default_params');
}
$data = $params->get('hikashopwishlistmodule');
if (HIKASHOP_J30 && (empty($data) || !is_object($data))) {
$db = JFactory::getDBO();
$query = 'SELECT params FROM ' . hikashop_table('modules', false) . ' WHERE id = ' . (int) $module->id;
$db->setQuery($query);
$itemData = json_decode($db->loadResult());
if (!empty($itemData->hikashopwishlistmodule) && is_object($itemData->hikashopwishlistmodule)) {
$data = $itemData->hikashopwishlistmodule;
$params->set('hikashopwishlistmodule', $data);
}
}
if (!empty($data) && is_object($data)) {
foreach ($data as $k => $v) {
$module_options[$k] = $v;
}
}
foreach ($module_options as $key => $optionElement) {
$params->set($key, $optionElement);
}
if (!empty($module)) {
foreach (get_object_vars($module) as $k => $v) {
if (!is_object($v)) {
$params->set($k, $v);
}
}
$params->set('from', 'module');
}
$params->set('return_url', $url);
$params->set('cart_type', 'wishlist');
$js = '';
hikashop_getLayout('product', 'cart', $params, $js);
}
}
if (empty($url)) {
global $Itemid;
if (isset($from_id)) {
$cart_id = $from_id;
}
if (JRequest::getInt('new_' . $cart_type . '_id', 0) != 0 && JRequest::getInt('delete', 0) == 0) {
$cart_id = JRequest::getInt('new_' . $cart_type . '_id', 0);
}
$cart = $class->get($cart_id, false, $cart_type);
if (!empty($cart) && (int) $cart_id != 0) {
$url = 'cart&task=showcart&cart_type=wishlist&cart_id=' . $cart_id . '&Itemid=' . $Itemid;
} else {
$url = 'cart&task=showcarts&cart_type=wishlist&Itemid=' . $Itemid;
}
$url = hikashop_completeLink($url, false, true);
}
if (!isset($stay)) {
$stay = JRequest::getInt('stay', 0);
}
if ($stay == 0) {
if (hikashop_disallowUrlRedirect($url)) {
return false;
}
if (JRequest::getVar('from_form', true)) {
JRequest::setVar('cart_type', 'wishlist');
$this->setRedirect($url);
return false;
} else {
ob_clean();
echo 'URL|' . $url;