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


PHP shopFunctionsF::getLastVisitedItemId方法代码示例

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


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

示例1: display

	/**
	 * Override of display
	 *
	 * @return  JController  A JController object to support chaining.
	 * @since   11.1
	 */
	public function display($cachable = false, $urlparams = false){

		if(VmConfig::get('use_as_catalog', 0)){
			// Get a continue link
			$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
			$categoryLink = '';
			if ($virtuemart_category_id) {
				$categoryLink = '&virtuemart_category_id=' . $virtuemart_category_id;
			}
			$ItemId = shopFunctionsF::getLastVisitedItemId();
			$ItemIdLink = '';
			if ($ItemId) {
				$ItemIdLink = '&Itemid=' . $ItemId;
			}
			vmInfo('This is a catalogue, you cannot acccess the cart');
			$continue_link = JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryLink . $ItemIdLink, FALSE);
			$app = JFactory::getApplication();
			$app ->redirect($continue_link);
		}

		$document = JFactory::getDocument();
		$viewType = $document->getType();
		$viewName = vRequest::getCmd('view', $this->default_view);
		$viewLayout = vRequest::getCmd('layout', 'default');

		$view = $this->getView($viewName, $viewType, '', array('layout' => $viewLayout));

		$view->assignRef('document', $document);

		$cart = VirtueMartCart::getCart();

		$cart->order_language = vRequest::getString('order_language', $cart->order_language);

		$cart->prepareCartData();
		$request = vRequest::getRequest();
		$task = vRequest::getCmd('task');
		if(($task == 'confirm' or isset($request['confirm'])) and !$cart->getInCheckOut()){

			$cart->confirmDone();
			$view = $this->getView('cart', 'html');
			$view->setLayout('order_done');
			$cart->_fromCart = false;
			$view->display();
			return true;
		} else {
			//$cart->_inCheckOut = false;
			$redirect = (isset($request['checkout']) or $task=='checkout');
			$cart->_inConfirm = false;
			$cart->checkoutData($redirect);
		}

		$cart->_fromCart = false;
		$view->display();

		return $this;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:62,代码来源:cart.php

示例2: prepareContinueLink

 public function prepareContinueLink()
 {
     $virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
     $categoryStr = '';
     if ($virtuemart_category_id) {
         $categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
     }
     $ItemidStr = '';
     $Itemid = shopFunctionsF::getLastVisitedItemId();
     if (!empty($Itemid)) {
         $ItemidStr = '&Itemid=' . $Itemid;
     }
     $this->continue_link = JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr . $ItemidStr, FALSE);
     //$this->continue_link_html = '<a class="continue_link" href="' . $continue_link . '" ><span>' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</span></a>';
     $this->continue_link_html = '<a class="continue continue_link" href="' . $this->continue_link . '">' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
     $this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart' . $ItemidStr, FALSE);
     return;
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:18,代码来源:vmview.php

示例3: defined

 * @author Max Milbers
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2014 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL2, see LICENSE.php
 * @version $Id: cart.php 7682 2014-02-26 17:07:20Z Milbo $
 */
defined('_JEXEC') or die('Restricted access');
$products_per_row = $viewData['products_per_row'];
$currency = $viewData['currency'];
$showRating = $viewData['showRating'];
$verticalseparator = " vertical-separator";
$verticalseparator2 = " vertical-separator2";
echo shopFunctionsF::renderVmSubLayout('askrecomjs');
$product_model = VmModel::getModel('product');
$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if (!empty($Itemid)) {
    $ItemidStr = '&Itemid=' . $Itemid;
}
foreach ($viewData['products'] as $type => $products) {
    $rowsHeight = shopFunctionsF::calculateProductRowsHeights($products, $currency, $products_per_row);
    if (!empty($type) and count($products) > 0) {
        $productTitle = vmText::_('COM_VIRTUEMART_' . strtoupper($type) . '_PRODUCT');
        ?>
<div class="<?php 
        echo $type;
        ?>
-view">
  <h4><?php 
        echo $productTitle;
        ?>
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:31,代码来源:products.php

示例4: prepareContinueLink

 function prepareContinueLink()
 {
     $virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
     $categoryStr = '';
     if ($virtuemart_category_id) {
         $categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
     }
     $ItemidStr = '';
     $Itemid = shopFunctionsF::getLastVisitedItemId();
     if (!empty($Itemid)) {
         $ItemidStr = '&Itemid=' . $Itemid;
     }
     $lang = '';
     if (VmConfig::$langCount > 1 and !empty(VmConfig::$vmlangSef)) {
         $lang = '&lang=' . VmConfig::$vmlangSef;
     }
     $this->continue_link = JURI::root() . '/index.php?option=com_virtuemart&view=category' . $categoryStr . $lang . $ItemidStr;
     $this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
     $this->cart_link = JURI::root() . 'index.php?option=com_virtuemart&view=cart' . $lang;
     return;
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:21,代码来源:vmview.php

示例5: display

 public function display($cachable = false, $urlparams = false)
 {
     if (VmConfig::get('use_as_catalog', 0)) {
         // Get a continue link
         $virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
         $categoryLink = '';
         if ($virtuemart_category_id) {
             $categoryLink = '&virtuemart_category_id=' . $virtuemart_category_id;
         }
         $ItemId = shopFunctionsF::getLastVisitedItemId();
         $ItemIdLink = '';
         if ($ItemId) {
             $ItemIdLink = '&Itemid=' . $ItemId;
         }
         $continue_link = JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryLink . $ItemIdLink, FALSE);
         $app = JFactory::getApplication();
         $app->redirect($continue_link, 'This is a catalogue, you cannot acccess the cart');
     }
     $document = JFactory::getDocument();
     $viewType = $document->getType();
     $tmpl = vRequest::getCmd('tmpl', false);
     if ($viewType == 'raw' and $tmpl == 'component') {
         $viewType = 'html';
     }
     $viewName = vRequest::getCmd('view', $this->default_view);
     $viewLayout = vRequest::getCmd('layout', 'default');
     $view = $this->getView($viewName, $viewType, '', array('layout' => $viewLayout));
     $view->assignRef('document', $document);
     $cart = VirtueMartCart::getCart();
     $cart->order_language = vRequest::getString('order_language', $cart->order_language);
     if (!isset($force)) {
         $force = VmConfig::get('oncheckout_opc', true);
     }
     $cart->prepareCartData(false);
     $html = true;
     if ($cart->virtuemart_shipmentmethod_id == 0 and ($s_id = VmConfig::get('set_automatic_shipment', false)) > 0) {
         vRequest::setVar('virtuemart_shipmentmethod_id', $s_id);
         $cart->setShipmentMethod($force, !$html);
     }
     if ($cart->virtuemart_paymentmethod_id == 0 and ($s_id = VmConfig::get('set_automatic_payment', false)) > 0 and $cart->products) {
         vRequest::setVar('virtuemart_paymentmethod_id', $s_id);
         $cart->setPaymentMethod($force, !$html);
     }
     $request = vRequest::getRequest();
     $task = vRequest::getCmd('task');
     if (($task == 'confirm' or isset($request['confirm'])) and !$cart->getInCheckOut()) {
         $cart->confirmDone();
         $view = $this->getView('cart', 'html');
         $view->setLayout('order_done');
         $cart->_fromCart = false;
         $view->display();
         return true;
     } else {
         //$cart->_inCheckOut = false;
         $redirect = (isset($request['checkout']) or $task == 'checkout');
         $cart->_inConfirm = false;
         $cart->checkoutData($redirect);
     }
     $cart->_fromCart = false;
     $view->display();
     return $this;
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:62,代码来源:cart.php

示例6: prepareContinueLink

 function prepareContinueLink()
 {
     $virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
     $categoryStr = '';
     if ($virtuemart_category_id) {
         $categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
     }
     $ItemidStr = '';
     $Itemid = shopFunctionsF::getLastVisitedItemId();
     if (!empty($Itemid)) {
         $ItemidStr = '&Itemid=' . $Itemid;
     }
     $lang = '';
     if (VmConfig::$jLangCount > 1 and !empty(VmConfig::$vmlangSef)) {
         $lang = '&lang=' . VmConfig::$vmlangSef;
     }
     $this->continue_link = JURI::root() . 'index.php?option=com_virtuemart&view=category' . $categoryStr . $lang . $ItemidStr;
     $this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
     $juri = JUri::getInstance()->toString(array('host', 'port'));
     $scheme = 'http';
     if (VmConfig::get('useSSL', false)) {
         $scheme .= 's';
     }
     $this->cart_link = $scheme . '://' . $juri . JURI::root(true) . '/index.php?option=com_virtuemart&view=cart' . $lang;
     return;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:26,代码来源:vmview.php


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