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


PHP comquick2cartHelper::getItemId方法代码示例

本文整理汇总了PHP中comquick2cartHelper::getItemId方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::getItemId方法的具体用法?PHP comquick2cartHelper::getItemId怎么用?PHP comquick2cartHelper::getItemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在comquick2cartHelper的用法示例。


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

示例1: unpublish

 /**
  * This function unpublishes taxrate.
  *
  * @since   2.2
  * @return   null
  */
 function unpublish()
 {
     $app = JFactory::getApplication();
     $input = JFactory::getApplication()->input;
     $cid = $input->get('cid', '', 'array');
     JArrayHelper::toInteger($cid);
     $model = $this->getModel('shipprofiles');
     if ($model->setItemState($cid, 0)) {
         $msg = JText::sprintf(JText::_('COM_QUICK2CART_S_SHIPPROFILE_UNPUBLISH_SUCCESSFULLY'), count($cid));
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
     $redirect = JRoute::_('index.php?option=com_quick2cart&view=shipprofiles&Itemid=' . $itemid, false);
     $this->setMessage($msg);
     $this->setRedirect($redirect);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:22,代码来源:shipprofiles.php

示例2: SendMailToOwner

 function SendMailToOwner($values)
 {
     $app = JFactory::getApplication();
     $mailfrom = $app->getCfg('mailfrom');
     $fromname = $app->getCfg('fromname');
     $sitename = $app->getCfg('sitename');
     $loguser = JFactory::getUser();
     $sendto = $loguser->email;
     $subject = JText::_('COM_Q2C_PRODUCT_AAPROVAL_OWNER_SUBJECT');
     $subject = str_replace('{sellername}', $loguser->name, $subject);
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=category&layout=default');
     $body = JText::_('COM_Q2C_PRODUCT_AAPROVAL_OWNER_BODY');
     $body = str_replace('{sellername}', $loguser->name, $body);
     $body = str_replace('{title}', $values->get('item_name', '', 'RAW'), $body);
     $body = str_replace('{link}', JUri::base() . 'index.php?option=com_quick2cart&view=category&layout=default&Itemid=' . $itemid, $body);
     $body = str_replace('{sitename}', $sitename, $body);
     $res = $comquick2cartHelper->sendmail($mailfrom, $subject, $body, $sendto);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:19,代码来源:product.php

示例3: onContentSearch

 /**
  * Search Quick2cart (Products).
  * The SQL must return the following fields that are used in a common display
  * routine: href, title, section, created, text, browsernav.
  *
  * @param   string  $text      Target search string.
  * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
  * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
  * @param   mixed   $areas     An array if the search it to be restricted to areas or null to search all areas.
  *
  * @return  array  Search results.
  *
  * @since   1.6
  */
 public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
 {
     $db = JFactory::getDbo();
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $groups = implode(',', $user->getAuthorisedViewLevels());
     $tag = JFactory::getLanguage()->getTag();
     require_once JPATH_ADMINISTRATOR . '/components/com_search/helpers/search.php';
     $searchText = $text;
     if (is_array($areas)) {
         if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
             return array();
         }
     }
     $sContent = $this->params->get('search_products', 1);
     $limit = $this->params->def('search_limit', 50);
     $nullDate = $db->getNullDate();
     $date = JFactory::getDate();
     $now = $date->toSql();
     $text = trim($text);
     if ($text == '') {
         return array();
     }
     switch ($phrase) {
         case 'exact':
             $text = $db->quote('%' . $db->escape($text, true) . '%', false);
             $wheres2 = array();
             $wheres2[] = 'a.name LIKE ' . $text;
             $wheres2[] = 'a.description LIKE ' . $text;
             $wheres2[] = 'a.metakey LIKE ' . $text;
             $wheres2[] = 'a.metadesc LIKE ' . $text;
             $where = '(' . implode(') OR (', $wheres2) . ')';
             break;
         case 'all':
         case 'any':
         default:
             $words = explode(' ', $text);
             $wheres = array();
             foreach ($words as $word) {
                 $word = $db->quote('%' . $db->escape($word, true) . '%', false);
                 $wheres2 = array();
                 $wheres2[] = 'a.name LIKE ' . $word;
                 $wheres2[] = 'a.description LIKE ' . $word;
                 $wheres2[] = 'a.metakey LIKE ' . $word;
                 $wheres2[] = 'a.metadesc LIKE ' . $word;
                 $wheres[] = implode(' OR ', $wheres2);
             }
             $where = '(' . implode($phrase == 'all' ? ') AND (' : ') OR (', $wheres) . ')';
             break;
     }
     switch ($ordering) {
         case 'oldest':
             $order = 'a.cdate ASC';
             break;
             /*case 'popular':
             		$order = 'a.hits DESC';
             		break;*/
         /*case 'popular':
         		$order = 'a.hits DESC';
         		break;*/
         case 'alpha':
             $order = 'a.name ASC';
             break;
         case 'category':
             $order = 'c.title ASC, a.title ASC';
             break;
         case 'newest':
         default:
             $order = 'a.cdate DESC';
             break;
     }
     $rows = array();
     $query = $db->getQuery(true);
     // Search products.
     if ($sContent && $limit > 0) {
         $query->clear();
         $query->select('a.item_id, a.name AS title, a.metadesc, a.metakey, a.cdate AS created')->select('a.description AS text')->select('c.title AS section')->from('#__kart_items AS a')->join('INNER', '#__categories AS c ON c.id=a.category')->where('(' . $where . ') AND a.state=1 AND c.published = 1')->group('a.item_id, a.name, a.metadesc, a.metakey, a.cdate, a.description, c.title, c.id')->order($order);
         $db->setQuery($query, 0, $limit);
         $list = $db->loadObjectList();
         $limit -= count($list);
         if (isset($list)) {
             $comquick2cartHelper = new comquick2cartHelper();
             $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=productpage&layout=default');
             foreach ($list as $key => $item) {
                 $link = 'index.php?option=com_quick2cart&view=productpage&layout=default&item_id=' . $item->item_id . '&Itemid=' . $itemid;
                 $list[$key]->href = JRoute::_($link, false);
//.........这里部分代码省略.........
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:101,代码来源:quick2cart.php

示例4: SendMailToOwnerAfterApproval

 function SendMailToOwnerAfterApproval($owner)
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=category&layout=default');
     $app = JFactory::getApplication();
     $fromname = $app->getCfg('fromname');
     $sitename = $app->getCfg('sitename');
     $subject = JText::_('COM_Q2C_PRODUCT_AAPROVED_SUBJECT');
     $subject = str_replace('{sellername}', $owner->name, $subject);
     $body = JText::_('COM_Q2C_PRODUCT_APPROVED_BODY');
     $body = str_replace('{name}', $owner->name, $body);
     $body = str_replace('{admin}', $fromname, $body);
     $body = str_replace('{link}', JUri::root() . 'index.php?option=com_quick2cart&view=category&layout=default&Itemid=' . $itemid, $body);
     $body = str_replace('{sitelink}', JUri::root(), $body);
     $body = str_replace('{sitename}', $sitename, $body);
     $res = $comquick2cartHelper->sendmail($owner->email, $subject, $body);
     return $res;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:18,代码来源:product.php

示例5: cancel

 function cancel()
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
     $redirect = JRoute::_('index.php?option=com_quick2cart&view=taxprofiles&Itemid=' . $itemid, false);
     $this->setMessage($msg);
     $this->setRedirect($redirect);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:8,代码来源:taxprofileform.php

示例6: display

 function display($tpl = null)
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $app = JFactory::getApplication();
     $this->params = $app->getParams('com_quick2cart');
     $zoneHelper = new zoneHelper();
     // Check whether view is accessible to user
     if (!$zoneHelper->isUserAccessible()) {
         return;
     }
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $option = 'com_quick2cart';
     $nameSpace = 'com_quick2cart.shipping';
     $task = $jinput->get('task');
     $view = $jinput->get('view', '');
     $layout = $jinput->get('layout', 'default');
     // Get other vars
     $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
     if ($layout == 'default') {
         // Display list of pluigns
         $filter_order = $mainframe->getUserStateFromRequest($nameSpace . 'filter_order', 'filter_order', 'tbl.id', 'cmd');
         $filter_order_Dir = $mainframe->getUserStateFromRequest($nameSpace . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
         $filter_orderstate = $mainframe->getUserStateFromRequest($nameSpace . 'filter_orderstate', 'filter_orderstate', '', 'string');
         $filter_name = $mainframe->getUserStateFromRequest($nameSpace . 'filter_name', 'filter_name', 'tbl.name', 'cmd');
         $search = $mainframe->getUserStateFromRequest($nameSpace . 'search', 'search', '', 'string');
         if (strpos($search, '"') !== false) {
             $search = str_replace(array('=', '<'), '', $search);
         }
         $search = JString::strtolower($search);
         $model = $this->getModel('shipping');
         // Get data from the model
         $items = $this->get('Items');
         $total = $model->getTotal();
         $pagination = $model->getPagination();
         if (count($items) == 1) {
             // If there is only one plug then redirct to that shipping view
             $extension_id = $items[0]->extension_id;
             $this->form = '';
             if ($extension_id) {
                 $this->form = $this->getShipPluginForm($extension_id);
                 $plugConfigLink = "index.php?option=com_quick2cart&task=shipping.getShipView&extension_id=" . $extension_id;
                 $CpItemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
                 $redirect = JRoute::_($plugConfigLink . '&Itemid=' . $itemid, false);
                 $app->redirect($redirect);
             }
         }
         // table ordering
         $lists['order_Dir'] = $filter_order_Dir;
         $lists['order'] = $filter_order;
         $lists['filter_name'] = $filter_name;
         // search filter
         $lists['search'] = $search;
         $this->assignRef('lists', $lists);
         $this->assignRef('items', $items);
         $this->assignRef('pagination', $pagination);
     } elseif ($layout == 'list') {
         $this->form = '';
         $extension_id = $jinput->get('extension_id');
         if ($extension_id) {
             $this->form = $this->getShipPluginForm($extension_id);
         }
     }
     //JToolBarHelper::title(JText::_('COM_QUICK2CART_SHIPM_SHIPPING_METHODS','quick2cart-logo');
     //JToolBarHelper::title(JText::_('COM_QUICK2CART_SHIPM_SHIPPING_METHODS'));
     parent::display($tpl);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:67,代码来源:view.html.php

示例7:

							<?php 
    echo JText::_($item->name);
    ?>
							<p class="help">
								<i>(<?php 
    echo !empty($item->plugDescription) ? $item->plugDescription : '';
    ?>
)</i>
							</p>
						</td>

						<td>
							<?php 
    $item->plugConfigLink = "index.php?option=com_quick2cart&task=shipping.getShipView&extension_id=" . $item->extension_id;
    $comquick2cartHelper = new comquick2cartHelper();
    $CpItemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
    $redirect = JRoute::_($item->plugConfigLink . '&Itemid=' . $itemid, false);
    ?>
							<a class="btn btn-primary btn-small" target="" href="<?php 
    echo !empty($item->plugConfigLink) ? $item->plugConfigLink : '';
    ?>
">
								<strong><?php 
    echo JText::_('COM_QUICK2CART_SHIPPING_EDIT_PLUGIN_PARAMS');
    ?>
</strong>
							</a>
						</td>
					</tr>
					<?php 
    $i = $i + 1;
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:default.php

示例8: publish

 /**
  * This function publishes taxrate.
  *
  * @since   2.2
  * @return   null
  */
 function publish()
 {
     $app = JFactory::getApplication();
     $input = JFactory::getApplication()->input;
     $cid = $input->get('cid', '', 'array');
     $data = array('publish' => 1, 'unpublish' => 0);
     $task = $this->getTask();
     $value = JArrayHelper::getValue($data, $task, 0, 'int');
     JArrayHelper::toInteger($cid);
     $model = $this->getModel('taxrates');
     try {
         $successCount = $model->setItemState($cid, $value);
         if ($successCount) {
             if ($value === 1) {
                 $ntext = 'COM_QUICK2CART_N_STORES_PUBLISHED';
             } elseif ($value === 0) {
                 $ntext = 'COM_QUICK2CART_N_STORES_UNPUBLISHED';
             }
             $this->setMessage(JText::plural($ntext, count($cid)));
         }
     } catch (Exception $e) {
         $this->setMessage($e->getMessage(), 'error');
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
     $redirect = JRoute::_('index.php?option=com_quick2cart&view=taxrates&Itemid=' . $itemid, false);
     $this->setRedirect($redirect);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:34,代码来源:taxrates.php

示例9: delete

 /**
  * Method use to delete shipprofile.
  *
  * @since	2.2
  */
 public function delete()
 {
     $app = JFactory::getApplication();
     $input = JFactory::getApplication()->input;
     $cid = $input->get('cid', '', 'array');
     JArrayHelper::toInteger($cid);
     $model = $this->getModel('shipprofile');
     $successCount = $model->delete($cid);
     if ($successCount) {
         $msg = JText::sprintf('COM_QUICK2CART_S_SHIPPROFILE_DELETED_SUCCESSFULLY');
         $app->enqueueMessage($ms);
     } else {
         $msg = JText::_('COM_QUICK2CART_S_SHIPPROFILE_ERROR_DELETE') . '</br>' . $model->getError();
         $app->enqueueMessage($msg, 'error');
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
     $redirect = JRoute::_('index.php?option=com_quick2cart&view=shipprofiles&Itemid=' . $itemid, false);
     $this->setRedirect($redirect);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:25,代码来源:shipprofile.php

示例10: delete

 /**
  * Method use when new zone create
  *
  * @return  void
  *
  * @since    1.6
  */
 public function delete()
 {
     $app = JFactory::getApplication();
     $input = JFactory::getApplication()->input;
     $cid = $input->get('cid', '', 'array');
     JArrayHelper::toInteger($cid);
     $model = $this->getModel('zones');
     $successCount = $model->delete($cid);
     if ($successCount) {
         if ($successCount >= 1) {
             $msg = JText::sprintf(JText::_('COM_QUICK2CART_ZONE_DELETED'), $successCount);
         }
     } else {
         $msg = JText::_('COM_QUICK2CART_ZONE_ERROR_DELETE') . '</br>' . $model->getError();
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $itemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
     $redirect = JRoute::_('index.php?option=com_quick2cart&view=zones&Itemid=' . $itemid, false);
     $this->setMessage($msg);
     $this->setRedirect($redirect);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:28,代码来源:zones.php


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