• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP hikashop_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中hikashop_get函数的典型用法代码示例。如果您正苦于以下问题:PHP hikashop_get函数的具体用法?PHP hikashop_get怎么用?PHP hikashop_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了hikashop_get函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: copy

 function copy()
 {
     $discounts = JRequest::getVar('cid', array(), '', 'array');
     $result = true;
     if (!empty($discounts)) {
         $discountClass = hikashop_get('class.discount');
         foreach ($discounts as $discount) {
             $data = $discountClass->get($discount);
             if ($data) {
                 unset($data->discount_id);
                 $data->discount_code = $data->discount_code . '_copy' . rand();
                 if (!$discountClass->save($data)) {
                     $result = false;
                 }
             }
         }
     }
     if ($result) {
         $app = JFactory::getApplication();
         if (!HIKASHOP_J30) {
             $app->enqueueMessage(JText::_('HIKASHOP_SUCC_SAVED'), 'success');
         } else {
             $app->enqueueMessage(JText::_('HIKASHOP_SUCC_SAVED'));
         }
         return $this->listing();
     }
     return $this->form();
 }
开发者ID:q0821,项目名称:esportshop,代码行数:28,代码来源:discount.php


示例2: add_module

 function add_module()
 {
     $id = hikashop_getCID('id');
     $menu = hikashop_get('class.menus');
     $menu->attachAssocModule($id);
     $this->edit();
 }
开发者ID:q0821,项目名称:esportshop,代码行数:7,代码来源:menus.php


示例3: load

 function load($fields, $id, $sort)
 {
     $this->values = array();
     $this->values[] = JHTML::_('select.option', 'weight', JText::_('PRODUCT_WEIGHT'));
     $this->values[] = JHTML::_('select.option', 'volume', JText::_('PRODUCT_VOLUME'));
     $this->values[] = JHTML::_('select.option', 'height', JText::_('PRODUCT_HEIGHT'));
     $this->values[] = JHTML::_('select.option', 'length', JText::_('PRODUCT_LENGTH'));
     $this->values[] = JHTML::_('select.option', 'width', JText::_('PRODUCT_WIDTH'));
     $this->values[] = JHTML::_('select.option', 'surface', JText::_('PRODUCT_SURFACE'));
     if (empty($id) || $id == 'datafilterfilter_data_cursor') {
         $this->values[] = JHTML::_('select.option', 'b.product_name', JText::_('PRODUCT_NAME'));
         $this->values[] = JHTML::_('select.option', 'price', JText::_('PRICE'));
         $this->values[] = JHTML::_('select.option', 'b.product_average_score', JText::_('RATING'));
         $fieldsClass = hikashop_get('class.field');
         $fields = $fieldsClass->getData('all', 'product');
         if (!empty($fields)) {
             foreach ($fields as $field) {
                 $this->values[] = JHTML::_('select.option', 'b.' . $field->field_namekey, $field->field_realname);
             }
         }
     }
     if ($sort) {
         $this->values[] = JHTML::_('select.option', 'b.product_created', JText::_('CREATION_DATE'));
         $this->values[] = JHTML::_('select.option', 'b.product_sales', JText::_('SALES'));
         $this->values[] = JHTML::_('select.option', 'b.product_modified', JText::_('MODIFICATION_DATE'));
         $this->values[] = JHTML::_('select.option', 'b.product_hit', JText::_('CLICKS'));
     }
     $fieldClass = hikashop_get('class.field');
     if (!empty($fields) && is_array($fields)) {
         foreach ($fields as $field) {
             $this->values[] = JHTML::_('select.option', $field->field_namekey, $field->field_realname);
         }
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:34,代码来源:product_information.php


示例4: onAfterOrderCreate

 public function onAfterOrderCreate(&$order)
 {
     if (empty($order) || empty($order->order_type) || $order->order_type != 'sale' || !isset($order->order_full_price)) {
         return;
     }
     $this->init();
     $send_confirmation = $this->params->get('send_confirmation', 1);
     if (!$send_confirmation && $order->order_status == 'confirmed') {
         $class = hikashop_get('class.cart');
         $class->cleanCartFromSession();
         return;
     }
     if ($send_confirmation && bccomp($order->order_full_price, 0, 5) == 0) {
         $config = hikashop_config();
         $orderObj = new stdClass();
         $orderObj->order_id = (int) $order->order_id;
         $orderObj->order_status = $config->get('order_confirmed_status', 'confirmed');
         $orderObj->history = new stdClass();
         $orderObj->history->history_notified = 1;
         $orderClass = hikashop_get('class.order');
         $orderClass->save($orderObj);
         $class = hikashop_get('class.cart');
         $class->cleanCartFromSession();
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:25,代码来源:validate_free_order.php


示例5: save

 function save()
 {
     $voteClass = hikashop_get('class.vote');
     if (!count($_POST)) {
         $app = JFactory::getApplication();
         $app->redirect(preg_replace('#ctrl=vote&task=save&[0-9a-z=]+#', '', preg_replace('#/vote/save/[0-9a-z-]+#', '', hikashop_currentURL())), '', 'message', true);
     }
     $element = new stdClass();
     $element->hikashop_vote_type = JRequest::getVar('hikashop_vote_type', 0, 'default', 'string', 0);
     $element->vote_ref_id = JRequest::getVar('hikashop_vote_ref_id', 0, 'default', 'int');
     if (empty($element->vote_ref_id)) {
         $element->vote_ref_id = JRequest::getVar('hikashop_vote_product_id', 0, 'default', 'int');
     }
     $element->user_id = JRequest::getVar('hikashop_vote_user_id', 0, 'default', 'int');
     $element->pseudo_comment = JRequest::getVar('pseudo_comment', 0, 'default', 'string', 0);
     $element->email_comment = JRequest::getVar('email_comment', 0, 'default', 'string', 0);
     $element->vote_type = JRequest::getVar('vote_type', 0, 'default', 'string', 0);
     $element->vote = JRequest::getVar('hikashop_vote', 0, 'default', 'int');
     $element->comment = JRequest::getVar('hikashop_vote_comment', '', '', 'string', JREQUEST_ALLOWRAW);
     // JRequest::getVar('hikashop_vote_comment', 0, 'default', 'string', 0);
     $element->comment = urldecode($element->comment);
     if (!empty($element->comment) || !empty($element->vote) || !empty($element->email_comment) || !empty($element->pseudo_comment) || $element->hikashop_vote_type == 'useful') {
         $voteClass->save($element);
     } else {
         echo '0';
     }
     exit;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:28,代码来源:vote.php


示例6: onAfterOrderUpdate

 function onAfterOrderUpdate(&$order, &$send_email)
 {
     if (!empty($order->order_id) && !empty($order->order_status)) {
         if (empty($order->order_user_id)) {
             $class = hikashop_get('class.order');
             $old = $class->get($order->order_id);
             $order->order_user_id = $old->order_user_id;
         }
         $userClass = hikashop_get('class.user');
         $user = $userClass->get($order->order_user_id);
         if (!empty($user)) {
             $helper = rtrim(str_replace('/', DS, JPATH_ADMINISTRATOR), DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'helpers' . DS . 'helper.php';
             if (file_exists($helper)) {
                 include_once $helper;
                 if (function_exists('acymailing_get')) {
                     $subClass = acymailing_get('class.subscriber');
                     $sub = $subClass->get($user->email);
                     if (!empty($sub->subid)) {
                         if (file_exists(rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'classes' . DS . 'filter.php')) {
                             $filterClass = acymailing_get('class.filter');
                             if ($filterClass) {
                                 $filterClass->subid = $sub->subid;
                                 $filterClass->trigger('hikaorder_' . $order->order_status);
                             }
                         }
                     }
                 }
             }
         }
     }
     return true;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:32,代码来源:acymailing.php


示例7: store

 function store($new = false)
 {
     if (hikashop_getCID('user_id') != hikashop_loadUser()) {
         return false;
     }
     $app = JFactory::getApplication();
     $class = hikashop_get('class.user');
     $class->fields_whitelist = array('user_id', 'user_partner_activated', 'user_partner_email');
     $config =& hikashop_config();
     if ($config->get('allow_currency_selection')) {
         $class->fields_whitelist[] = 'user_currency_id';
     }
     $status = $class->saveForm();
     if ($status) {
         if (!HIKASHOP_J30) {
             $app->enqueueMessage(JText::_('HIKASHOP_SUCC_SAVED'), 'success');
         } else {
             $app->enqueueMessage(JText::_('HIKASHOP_SUCC_SAVED'));
         }
         if (!$new) {
             JRequest::setVar('cid', $status);
         } else {
             JRequest::setVar('cid', 0);
         }
         JRequest::setVar('fail', null);
     } else {
         $app->enqueueMessage(JText::_('ERROR_SAVING'), 'error');
         if (!empty($class->errors)) {
             foreach ($class->errors as $oneError) {
                 $app->enqueueMessage($oneError, 'error');
             }
         }
     }
     return $status;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:35,代码来源:affiliate.php


示例8: getProductRoute

 public static function getProductRoute($contentId, $contentCatId, $language)
 {
     list($id, $name) = explode(':', $contentId, 2);
     if (!(include_once rtrim(JPATH_ADMINISTRATOR, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_hikashop' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'helper.php')) {
         return;
     }
     $class = hikashop_get('class.product');
     $data = $class->get($id);
     if (empty($link)) {
         $link = 'index.php?option=com_hikashop&ctrl=product&task=show&cid=' . $id . '&name=' . $name;
     }
     $needles = array('layout' => 'listing');
     if (!empty($language) && $language != '*' && JLanguageMultilang::isEnabled()) {
         static::buildLanguageLookup();
         if (isset(static::$lang_lookup[$language])) {
             $link .= '&lang=' . static::$lang_lookup[$language];
             $needles['language'] = $language;
         }
     }
     if ($item = self::lookupItem($needles, 'product')) {
         $link .= '&Itemid=' . $item;
     } elseif (!empty($needles) && ($item = self::lookupItem(array(), 'product'))) {
         $link .= '&Itemid=' . $item;
     }
     $link = hikashop_contentLink($link, $data, false, true);
     return $link;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:27,代码来源:route.php


示例9: checkOrders

 function checkOrders($notify = false)
 {
     $db = JFactory::getDBO();
     $config =& hikashop_config();
     $status = $config->get('order_created_status');
     $query = 'SELECT order_id, order_status, order_created FROM ' . hikashop_table('order') . ' WHERE order_type = ' . $db->Quote('sale') . ' AND order_created < ' . (time() - $this->period) . ' AND order_status = ' . $db->Quote($status) . ' ORDER BY order_created ASC LIMIT 0, 20';
     $db->setQuery($query);
     $orders = $db->loadObjectList();
     if (!empty($orders)) {
         $orderClass = hikashop_get('class.order');
         $status = $config->get('cancelled_order_status');
         $statuses = explode(',', $status);
         $status = reset($statuses);
         foreach ($orders as $order) {
             $update = new stdClass();
             $update->order_id = $order->order_id;
             $update->order_status = $status;
             if ($notify) {
                 $update->history = new stdClass();
                 $update->history->history_notified = 1;
             }
             $orderClass->save($update);
         }
     }
     $app = JFactory::getApplication();
     $this->message = 'Orders checked';
     $app->enqueueMessage($this->message);
     return true;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:29,代码来源:order_auto_cancel.php


示例10: display

 function display($map, $value, $type = '')
 {
     $class = hikashop_get('class.category');
     $mainCategories = $class->getParents($value);
     $mainHTML = array();
     $ids = array();
     if (!empty($mainCategories)) {
         foreach ($mainCategories as $mainCategory) {
             $ids[] = $mainCategory->category_id;
         }
         $where = array();
         if (!empty($type)) {
             $where = array(' a.category_type IN (' . $class->database->Quote($type) . ',\'root\')');
         }
         $childs = $class->loadAllWithTrans($ids, false, $where, ' ORDER BY a.category_name ASC');
         foreach ($mainCategories as $k => $mainCategory) {
             $values = array();
             $current = 0;
             $values[] = '<option value="' . $mainCategory->category_id . '">' . JText::_('HIKA_NONE') . '</option>';
             foreach ($childs as $child) {
                 if ($child->category_parent_id == $mainCategory->category_id) {
                     $values[] = '<option value="' . $child->category_id . '" ' . (in_array($child->category_id, $ids) ? 'selected="selected" ' : '') . '>' . $child->translation . '</option>';
                 }
             }
             if (count($values) == 1) {
                 continue;
             }
             $mainHTML[] = '<select name="' . $map . '_chooser_' . $k . '" id="' . $map . '_chooser_' . $k . '" class="inputbox" size="1" onchange="document.getElementById(\'' . $map . '\').value=this.value; document.adminForm.submit();">' . "\n" . implode("\n", $values) . "\n" . '</select>';
         }
     }
     return implode('', $mainHTML);
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:32,代码来源:breadcrumb.php


示例11: getInput

 protected function getInput()
 {
     if (!defined('DS')) {
         define('DS', DIRECTORY_SEPARATOR);
     }
     if (!(include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php')) {
         return 'This plugin can not work without the Hikashop Component';
     }
     $id = JRequest::getInt('extension_id');
     $plugins = hikashop_get('class.plugins');
     $plugin = $plugins->get($id);
     $name = @$plugin->element;
     if (@$plugin->folder == 'hikashopshipping') {
         $group = 'shipping';
     } elseif (@$plugin->folder == 'hikashop') {
         $group = 'plugin';
     } else {
         $group = 'payment';
     }
     $config =& hikashop_config();
     if (!hikashop_isAllowed($config->get('acl_plugins_manage', 'all'))) {
         return 'Access to the HikaShop options of the plugins is restricted';
     }
     $text = '<a style="float:left;" title="' . JText::_('HIKASHOP_OPTIONS') . '"  href="' . JRoute::_('index.php?option=com_hikashop&ctrl=plugins&fromjoomla=1&task=listing&name=' . $name . '&plugin_type=' . $group) . '" >' . JText::_('HIKASHOP_OPTIONS') . '</a>';
     return $text;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:26,代码来源:pluginoptions.php


示例12: checkProducts

 function checkProducts()
 {
     $db = JFactory::getDBO();
     $query = 'SELECT * FROM ' . hikashop_table('product') . ' WHERE ' . ' product_quantity < ' . (int) $this->stock_limit . ' AND product_published = 1 AND product_quantity != -1 ' . ' AND (product_sale_start = 0 OR product_sale_start < ' . time() . ') AND (product_sale_end = 0 OR product_sale_end > ' . time() . ')';
     $db->setQuery($query);
     $products = $db->loadObjectList();
     if (!empty($products)) {
         $mailClass = hikashop_get('class.mail');
         $infos = new stdClass();
         $infos->products =& $products;
         $mail = $mailClass->get('out_of_stock', $infos);
         $mail->subject = JText::sprintf($mail->subject, HIKASHOP_LIVE);
         $config =& hikashop_config();
         if (!empty($infos->email)) {
             $mail->dst_email = $infos->email;
         } else {
             $mail->dst_email = $config->get('from_email');
         }
         if (!empty($infos->name)) {
             $mail->dst_name = $infos->name;
         } else {
             $mail->dst_name = $config->get('from_name');
         }
         $mailClass->sendMail($mail);
     }
     $app = JFactory::getApplication();
     $this->message = 'Products quantity checked';
     $app->enqueueMessage($this->message);
     return true;
 }
开发者ID:q0821,项目名称:esportshop,代码行数:30,代码来源:out_of_stock.php


示例13: options

 function options(&$params)
 {
     $this->id = $params->get('id');
     $this->name = str_replace('[]', '', $params->get('name'));
     $this->element = $params->get('value');
     $this->pricetaxType = hikashop_get('type.pricetax');
     $this->discountDisplayType = hikashop_get('type.discount_display');
     $this->priceDisplayType = hikashop_get('type.priceDisplay');
     $this->arr = array(JHTML::_('select.option', '-1', JText::_('HIKA_INHERIT')), JHTML::_('select.option', '1', JText::_('HIKASHOP_YES')), JHTML::_('select.option', '0', JText::_('HIKASHOP_NO')));
     $this->arr[0]->class = 'btn-primary';
     $this->arr[1]->class = 'btn-success';
     $this->arr[2]->class = 'btn-danger';
     $this->type = 'cart';
     if (preg_match('/wishlist/', $this->name)) {
         $this->type = 'wishlist';
     }
     $cid = JRequest::getInt('id', '');
     if (empty($cid)) {
         $cid = hikashop_getCID();
     }
     $modulesClass = hikashop_get('class.modules');
     $module = $modulesClass->get($cid);
     if (empty($this->element)) {
         $this->element = $module->hikashop_params;
     }
     $config = hikashop_config();
     $this->default_params = $config->get('default_params');
 }
开发者ID:q0821,项目名称:esportshop,代码行数:28,代码来源:view.html.php


示例14: onAfterRoute

 function onAfterRoute()
 {
     $app = JFactory::getApplication();
     if ($app->isAdmin()) {
         return true;
     }
     if (@$_REQUEST['option'] == 'com_user' && @$_REQUEST['view'] == 'register' || @$_REQUEST['option'] == 'com_users' && @$_REQUEST['view'] == 'registration' && !in_array(@$_REQUEST['task'], array('remind.remind', 'reset.request', 'reset.confirm', 'reset.complete'))) {
         $Itemid = $this->params->get('item_id');
         if (empty($Itemid)) {
             global $Itemid;
             if (empty($Itemid)) {
                 $urlItemid = JRequest::getInt('Itemid');
                 if ($urlItemid) {
                     $Itemid = $urlItemid;
                 }
             }
         }
         if (!(include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_hikashop' . DS . 'helpers' . DS . 'helper.php')) {
             return true;
         }
         $menuClass = hikashop_get('class.menus');
         if (!empty($Itemid)) {
             $Itemid = $menuClass->loadAMenuItemId('', '', $Itemid);
         }
         if (empty($Itemid)) {
             $Itemid = $menuClass->loadAMenuItemId('', '');
         }
         $url_itemid = '';
         if (!empty($Itemid)) {
             $url_itemid .= '&Itemid=' . $Itemid;
         }
         $app->redirect(JRoute::_('index.php?option=com_hikashop&ctrl=user&task=form' . $url_itemid, false));
     }
     return true;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:35,代码来源:hikashopregistrationredirect.php


示例15: form

 function form()
 {
     $warehouse_id = hikashop_getCID('warehouse_id');
     $class = hikashop_get('class.warehouse');
     if (!empty($warehouse_id)) {
         $element = $class->get($warehouse_id, true);
         $task = 'edit';
     } else {
         $element = new stdClass();
         $element->warehouse_published = 1;
         $task = 'add';
     }
     hikashop_setTitle(JText::_($this->nameForm), $this->icon, $this->ctrl . '&task=' . $task . '&warehouse=' . $warehouse_id);
     $this->toolbar = array('save', array('name' => 'save2new', 'display' => version_compare(JVERSION, '1.7', '>=')), 'apply', 'cancel', '|', array('name' => 'pophelp', 'target' => $this->ctrl . '-listing'));
     $editor = hikashop_get('helper.editor');
     $editor->name = 'data[warehouse][warehouse_description]';
     $editor->content = @$element->warehouse_description;
     $this->assignRef('editor', $editor);
     $this->assignRef('element', $element);
     $toggle = hikashop_get('helper.toggle');
     $this->assignRef('toggle', $toggle);
     $warehouse = hikashop_get('type.warehouse');
     $this->assignRef('warehouse', $warehouse);
     $popup = hikashop_get('helper.popup');
     $this->assignRef('popup', $popup);
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:26,代码来源:view.html.php


示例16: onAfterOrderConfirm

 /**
  *
  * @param object $order
  * @param array $methods
  * @param integer $method_id
  */
 public function onAfterOrderConfirm(&$order, &$methods, $method_id)
 {
     parent::onAfterOrderConfirm($order, $methods, $method_id);
     //
     //
     $this->response = $this->generateTransaction($order, $method_id);
     // Store the Access Code directly in the order object
     //
     if (!$this->response->getErrors()) {
         $update_order = new stdClass();
         $update_order->order_id = (int) $order->order_id;
         $update_order->order_payment_params = @$order->order_payment_params;
         if (!empty($update_order->order_payment_params) && is_string($update_order->order_payment_params)) {
             $update_order->order_payment_params = unserialize($update_order->order_payment_params);
         }
         if (empty($update_order->order_payment_params)) {
             $update_order->order_payment_params = new stdClass();
         }
         $update_order->order_payment_params->eway_accesscode = $this->response->AccessCode;
         $orderClass = hikashop_get('class.order');
         $orderClass->save($update_order);
     } else {
         $app = JFactory::getApplication();
         $error_msg = array();
         foreach ($this->response->getErrors() as $error) {
             $error_mgs[] = eWayRapidBridge::getErrorMessage(trim($error));
         }
         $this->app->enqueueMessage('eWay Errors<br/>' . implode('<br/>', $error_msgs), 'error');
     }
     return $this->showPage('end');
 }
开发者ID:HikaShop,项目名称:hikashoppayment-ewayrapid,代码行数:37,代码来源:ewayrapid.php


示例17: loadAddress

 static function loadAddress(&$order, $type)
 {
     $app =& JFactory::getApplication();
     $cart = hikashop_get('class.cart');
     $address = $app->getUserState(HIKASHOP_COMPONENT . '.' . $type . '_address');
     if (!empty($address)) {
         $cart->loadAddress($order->cart, $address, 'object', $type);
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:9,代码来源:bf_rbsglobalgateway_helper.php


示例18: remove

 function remove()
 {
     $mail_name = JRequest::getCmd('mail_name');
     $type = JRequest::getCmd('type');
     $class = hikashop_get('class.' . $this->type);
     $num = $class->delete($mail_name, $type);
     $app = JFactory::getApplication();
     $app->enqueueMessage(JText::sprintf('SUCC_DELETE_ELEMENTS', $num), 'message');
     return $this->listing();
 }
开发者ID:q0821,项目名称:esportshop,代码行数:10,代码来源:email.php


示例19: getTable

 function getTable()
 {
     $trans_table = 'jf_content';
     $translationHelper = hikashop_get('helper.translation');
     $translationHelper->isMulti();
     if ($translationHelper->falang) {
         $trans_table = 'falang_content';
     }
     return hikashop_table($trans_table, false);
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:10,代码来源:translation.php


示例20: loadConversionTables

 function loadConversionTables(&$obj)
 {
     $obj->characteristics = array();
     $obj->characteristicsConversionTable = array();
     $query = 'SELECT * FROM ' . hikashop_table('characteristic') . ' ORDER BY characteristic_parent_id ASC, characteristic_ordering ASC';
     $this->database->setQuery($query);
     $obj->characteristics = $this->database->loadObjectList('characteristic_id');
     $app = JFactory::getApplication();
     $translationHelper = hikashop_get('helper.translation');
     if (!$app->isAdmin() && $translationHelper->isMulti(true) && class_exists('JFalangDatabase')) {
         $this->database->setQuery($query);
         $obj->characteristics = array_merge($obj->characteristics, $this->database->loadObjectList('characteristic_id', 'stdClass', false));
     } elseif (!$app->isAdmin() && $translationHelper->isMulti(true) && (class_exists('JFDatabase') || class_exists('JDatabaseMySQLx'))) {
         $this->database->setQuery($query);
         if (HIKASHOP_J25) {
             $obj->characteristics = array_merge($obj->characteristics, $this->database->loadObjectList('characteristic_id', 'stdClass', false));
         } else {
             $obj->characteristics = array_merge($obj->characteristics, $this->database->loadObjectList('characteristic_id', false));
         }
     }
     if (!empty($obj->characteristics)) {
         foreach ($obj->characteristics as $characteristic) {
             $key = '';
             $key_alias = '';
             if (!empty($characteristic->characteristic_parent_id) && !empty($obj->characteristics[$characteristic->characteristic_parent_id])) {
                 if (function_exists('mb_strtolower')) {
                     $key = mb_strtolower(trim($obj->characteristics[$characteristic->characteristic_parent_id]->characteristic_value)) . '_';
                     $key_alias = mb_strtolower(trim($obj->characteristics[$characteristic->characteristic_parent_id]->characteristic_alias)) . '_';
                 } else {
                     $key = strtolower(trim($obj->characteristics[$characteristic->characteristic_parent_id]->characteristic_value)) . '_';
                     $key_alias = strtolower(trim($obj->characteristics[$characteristic->characteristic_parent_id]->characteristic_alias)) . '_';
                 }
             }
             if (function_exists('mb_strtolower')) {
                 $key2 = mb_strtolower(trim($characteristic->characteristic_value, '" '));
             } else {
                 $key2 = strtolower(trim($characteristic->characteristic_value, '" '));
             }
             $key .= $key2;
             $key_alias .= $key2;
             if (!empty($characteristic->characteristic_alias)) {
                 if (function_exists('mb_strtolower')) {
                     $alias = mb_strtolower(trim($characteristic->characteristic_alias, '" '));
                 } else {
                     $alias = strtolower(trim($characteristic->characteristic_alias, '" '));
                 }
                 $obj->characteristicsConversionTable[$alias] = $characteristic->characteristic_id;
             }
             $obj->characteristicsConversionTable[$key_alias] = $characteristic->characteristic_id;
             $obj->characteristicsConversionTable[$key] = $characteristic->characteristic_id;
             $obj->characteristicsConversionTable[$key2] = $characteristic->characteristic_id;
         }
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:54,代码来源:characteristic.php



注:本文中的hikashop_get函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP hikashop_getCID函数代码示例发布时间:2022-05-15
下一篇:
PHP hikashop_currentURL函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap