当前位置: 首页>>代码示例>>PHP>>正文


PHP hikashop_get函数代码示例

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


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


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