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

PHP VirtueMartCart类代码示例

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

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



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

示例1: getExtraPluginNameInfo

 function getExtraPluginNameInfo()
 {
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     //if (!isset($cart->cartPrices)) {
     $cart->getCartPrices();
     //}
     $pbxTotalVendorCurrency = $this->getPbxAmount($cart->cartPrices['salesPrice']);
     $subscribe = $this->getSubscribeProducts($cart, $pbxTotalVendorCurrency);
     $extraInfo = false;
     if (!empty($subscribe)) {
         $extraInfo['subscribe'] = true;
         $amount2montInCurrency = vmPSPlugin::getAmountInCurrency($subscribe['PBX_2MONT'] * 0.01, $this->_method->payment_currency);
         $amount1montInCurrency = vmPSPlugin::getAmountInCurrency($subscribe['PBX_TOTAL'] * 0.01, $this->_method->payment_currency);
         $extraInfo['subscribe_2mont'] = $amount2montInCurrency['display'];
         $extraInfo['subscribe_1mont'] = $amount1montInCurrency['display'];
         $extraInfo['subscribe_nbpaie'] = $subscribe['PBX_NBPAIE'];
         $extraInfo['subscribe_freq'] = $subscribe['PBX_FREQ'];
         $extraInfo['subscribe_quand'] = $this->_method->subscribe_quand;
         $extraInfo['subscribe_delais'] = $this->_method->subscribe_delais;
     }
     return $extraInfo;
 }
开发者ID:ForAEdesWeb,项目名称:AEW9,代码行数:25,代码来源:subscribe.php


示例2: __construct

 function __construct()
 {
     if (!class_exists('VmConfig')) {
         require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
     }
     $this->cart = VirtueMartCart::getCart(false);
     JFactory::getLanguage()->load('com_virtuemart');
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:8,代码来源:helper.php


示例3: withKeepAlive

 public function withKeepAlive()
 {
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     if (!empty($cart->cartProductsData)) {
         vmJsApi::keepAlive(1, 4);
     }
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:10,代码来源:vmview.php


示例4: display

 public function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $layoutName = $this->getLayout();
     if (!$layoutName) {
         $layoutName = JRequest::getWord('layout', 'default');
     }
     $this->assignRef('layoutName', $layoutName);
     $format = JRequest::getWord('format');
     JLoader::register('VirtueMartCart', JPATH_VM_SITE . '/helpers/cart.php');
     $cart = VirtueMartCart::getCart();
     $this->assignRef('cart', $cart);
     $this->prepareContinueLink();
     shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName);
     parent::display($tpl);
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:16,代码来源:view.json.php


示例5: display

 public function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $layoutName = $this->getLayout();
     if (!$layoutName) {
         $layoutName = vRequest::getCmd('layout', 'default');
     }
     $this->assignRef('layoutName', $layoutName);
     $format = vRequest::getCmd('format');
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     $this->assignRef('cart', $cart);
     $this->prepareContinueLink();
     shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName);
     parent::display($tpl);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:18,代码来源:view.json.php


示例6: display

 public function display($tpl = null)
 {
     $layoutName = $this->getLayout();
     if (!$layoutName) {
         $layoutName = vRequest::getCmd('layout', 'default');
     }
     $this->assignRef('layoutName', $layoutName);
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $this->cart = VirtueMartCart::getCart();
     $this->prepareContinueLink();
     if (!class_exists('VmTemplate')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'vmtemplate.php';
     }
     VmTemplate::setVmTemplate($this, 0, 0, $layoutName);
     parent::display($tpl);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:18,代码来源:view.json.php


示例7: getList

 public static function getList($params)
 {
     if (class_exists('VirtueMartCart')) {
         $productModel = VmModel::getModel('product');
         $calculator = calculationHelper::getInstance();
         $customfields = VmModel::getModel('Customfields');
         $cart = VirtueMartCart::getCart(false);
         $cart->pricesUnformatted = $calculator->getCheckoutPrices($cart, true);
         $viewName = vRequest::getString('view', 0);
         if ($viewName == 'cart') {
             $checkAutomaticPS = true;
         } else {
             $checkAutomaticPS = false;
         }
         $cart->prepareAjaxData($checkAutomaticPS);
         $productModel->addImages($cart->products);
         ini_set('xdebug.var_display_max_depth', 10);
         return $cart;
     }
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:20,代码来源:helper.php


示例8: onAfterDispatch

 /**
  * Do something onAfterDispatch 
  */
 function onAfterDispatch()
 {
     global $mainframe, $Itemid, $page, $option, $cart, $_SESSION, $_POST, $_REQUEST, $VM_CHECKOUT_MODULES, $ship_to_info_id, $vars, $auth, $sess;
     // if Admin side, just exit
     $application = JFactory::getApplication();
     if ($application->isAdmin()) {
         return;
     }
     $option = JRequest::getCmd('option');
     if ($option != 'com_virtuemart') {
         return;
     }
     $plugin =& JPluginHelper::getPlugin('system', 'vmskipcart');
     if (JFile::exists(JPATH_SITE . '/components/com_virtuemart/virtuemart_parser.php')) {
         //Virtuemart 1.1.x
         $currentPage = $page;
         $cart = $_SESSION['cart'];
         if ($currentPage == 'shop.cart' && $cart["idx"]) {
             $href = $sess->url($_SERVER['PHP_SELF'] . '?page=checkout.index&ssl_redirect=1', true);
             $application->redirect($href);
         }
     } else {
         if (JFile::exists(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php') && class_exists('VirtueMartCart')) {
             //Virtuemart 2.0
             $view = JRequest::getWord('view');
             if ($view == 'cart') {
                 $session = JFactory::getSession();
                 $redirected = $session->get('vmcart_redirect', false, 'vmcart_redirect');
                 if (!$redirected) {
                     $cart = VirtueMartCart::getCart();
                     $session->set('vmcart_redirect', true, 'vmcart_redirect');
                     $cart->setDataValidation(true);
                     $cart->checkout();
                 } else {
                     $session->set('vmcart_redirect', false, 'vmcart_redirect');
                 }
             }
         }
     }
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:43,代码来源:vmskipcart.php


示例9: plgVmOnPaymentResponseReceived

 /**
  * @param $html
  * @return bool|null|string
  */
 function plgVmOnPaymentResponseReceived(&$html)
 {
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     if (!class_exists('shopFunctionsF')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     //vmdebug('PAYPAL plgVmOnPaymentResponseReceived', $paypal_data);
     // the payment itself should send the parameter needed.
     $virtuemart_paymentmethod_id = JRequest::getInt('pm', 0);
     $order_number = JRequest::getString('on', 0);
     if (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {
         return NULL;
         // Another method was selected, do nothing
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return NULL;
     }
     if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
         return NULL;
     }
     if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {
         // JError::raiseWarning(500, $db->getErrorMsg());
         return '';
     }
     $payment_name = $this->renderPluginName($method);
     $html = $this->_getPaymentResponseHtml($paymentTable, $payment_name);
     //We delete the old stuff
     // get the correct cart / session
     $cart = VirtueMartCart::getCart();
     $cart->emptyCart();
     return TRUE;
 }
开发者ID:SeventF,项目名称:ikea.com,代码行数:41,代码来源:paypal.php


示例10: updateCartWithKlarnacheckoutAddress

 function updateCartWithKlarnacheckoutAddress()
 {
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     $updated = false;
     $zip = vRequest::getWord('zip', '');
     $email = vRequest::getEmail('email', '');
     $first_name = vRequest::getWord('given_name', '');
     $last_name = vRequest::getWord('family_name', '');
     if ($zip) {
         $cart->BT['zip'] = $zip;
         $updated = true;
     }
     if ($email) {
         $cart->BT['email'] = $email;
         $updated = true;
     }
     if ($first_name) {
         $cart->BT['first_name'] = $first_name;
         $updated = true;
     }
     if ($last_name) {
         $cart->BT['last_name'] = $last_name;
         $updated = true;
     }
     if (!$updated) {
         return $updated;
     }
     $cart->setCartIntoSession();
     return $updated;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:33,代码来源:klarnacheckout.php


示例11: defined

 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
// Implement Joomla's form validation
JHtml::_('behavior.formvalidation');
JHtml::stylesheet('vmpanels.css', JURI::root() . 'components/com_virtuemart/assets/css/');
?>
<h1><?php 
echo $this->page_title;
?>
</h1>
<?php 
if (!class_exists('VirtueMartCart')) {
    require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
}
$this->cart = VirtueMartCart::getCart();
$url = 0;
if ($this->cart->_fromCart or $this->cart->getInCheckOut()) {
    $rview = 'cart';
} else {
    $rview = 'user';
}
$task = '';
if ($this->cart->getInCheckOut()) {
    //$task = '&task=checkout';
}
$url = JRoute::_('index.php?option=com_virtuemart&view=' . $rview . $task, $this->useXHTML, $this->useSSL);
echo shopFunctionsF::getLoginForm(TRUE, FALSE, $url);
$this->vmValidator();
?>
开发者ID:proyectoseb,项目名称:Matrix,代码行数:30,代码来源:edit_address.php


示例12: plgVmOnSelfCallFE

	/**
	 * For Express Checkout
	 * @param $type
	 * @param $name
	 * @param $render
	 * @return bool|null
	 */

	function plgVmOnSelfCallFE($type, $name, &$render) {
		if ($name != $this->_name || $type != 'vmpayment') {
			return FALSE;
		}
		$action = jRequest::getWord('action');
		$virtuemart_paymentmethod_id = JRequest::getInt('virtuemart_paymentmethod_id');
		//Load the method
		if (!($this->_currentMethod = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {
			return NULL; // Another method was selected, do nothing
		}
		if ($action != 'SetExpressCheckout') {
			return false;
		}
		if (!class_exists('VirtueMartCart')) {
			require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');
		}
		$cart = VirtueMartCart::getCart();
		$cart->virtuemart_paymentmethod_id = $virtuemart_paymentmethod_id;
		$cart->setCartIntoSession();

		$paypalInterface = $this->_loadPayPalInterface();
		$paypalInterface->setCart($cart);
		$paypalInterface->setTotal($cart->pricesUnformatted['billTotal']);
		$paypalInterface->loadCustomerData();
		$paypalInterface->getExtraPluginInfo($this->_currentMethod);

		if (!$paypalInterface->validate()) {
			VmInfo('VMPAYMENT_PAYPAL_PAYMENT_NOT_VALID');
			return false;
		} else {
			$app = JFactory::getApplication();
			$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&Itemid=' . JRequest::getInt('Itemid'), false));
		}
	}
开发者ID:sergy444,项目名称:joomla,代码行数:42,代码来源:paypal.php


示例13: getBasketDetails

 /**
  * generate BillSafe informations from basket
  * @return array criterion for billSafe
  */
 private function getBasketDetails()
 {
     $user = JFactory::getUser();
     $cart = VirtueMartCart::getCart(false);
     $items = $cart->products;
     $prices = $cart->cartPrices;
     $params = array();
     if ($items) {
         $i = 0;
         //	ITEMS
         foreach ($items as $key => $item) {
             $i++;
             $prefix = 'CRITERION.POS_' . sprintf('%02d', $i);
             $params[$prefix . '.POSITION'] = $i;
             $params[$prefix . '.QUANTITY'] = (int) $item->quantity;
             if (empty($item->product_unit)) {
                 $item->product_unit = 'Stk.';
             }
             $params[$prefix . '.UNIT'] = $item->product_unit;
             #price in cents
             $params[$prefix . '.AMOUNT_UNIT_GROSS'] = $prices[$key]['basePriceWithTax'] * 100;
             $params[$prefix . '.AMOUNT_GROSS'] = $prices[$key]['subtotal_with_tax'] * 100;
             $item->product_name = preg_replace('/%/', 'Proz.', $item->product_name);
             $item->product_name = preg_replace('/("|\'|!|$|=)/', ' ', $item->product_name);
             $params[$prefix . '.TEXT'] = strlen($item->product_name) > 100 ? substr($item->product_name, 0, 90) . '...' : $item->product_name;
             $params[$prefix . '.ARTICLE_NUMBER'] = $item->product_sku;
             $params[$prefix . '.PERCENT_VAT'] = sprintf('%1.2f', $prices[$key]['VatTax'][$item->product_tax_id]['1']);
             $params[$prefix . '.ARTICLE_TYPE'] = 'goods';
         }
         //	SHIPPING
         require VMPATH_ADMIN . DS . 'models' . DS . 'shipmentmethod.php';
         $vmms = new VirtueMartModelShipmentmethod();
         $shipmentInfo = $vmms->getShipments();
         foreach ($shipmentInfo as $skey => $svalue) {
             if ($svalue->virtuemart_shipmentmethod_id == $cart->virtuemart_shipmentmethod_id) {
                 $shipmentData = array();
                 foreach (explode("|", $svalue->shipment_params) as $line) {
                     list($key, $value) = explode('=', $line, 2);
                     $shipmentData[$key] = str_replace('"', '', $value);
                 }
                 $shipmentTaxId = $shipmentData['tax_id'];
                 $shipmentTax = sprintf('%1.2f', $cart->cartData['VatTax'][$shipmentTaxId]['calc_value']);
             }
         }
         $i++;
         $prefix = 'CRITERION.POS_' . sprintf('%02d', $i);
         $params[$prefix . '.POSITION'] = $i;
         $params[$prefix . '.QUANTITY'] = '1';
         $params[$prefix . '.UNIT'] = 'Stk.';
         $params[$prefix . '.AMOUNT_UNIT_GROSS'] = $prices['salesPriceShipment'] * 100;
         $params[$prefix . '.AMOUNT_GROSS'] = $prices['salesPriceShipment'] * 100;
         $params[$prefix . '.TEXT'] = 'Shipping';
         $params[$prefix . '.ARTICLE_NUMBER'] = 'Shipping';
         $params[$prefix . '.PERCENT_VAT'] = $shipmentTax;
         $params[$prefix . '.ARTICLE_TYPE'] = 'shipment';
         //	COUPON
         if (isset($prices['couponValue']) && $prices['couponValue'] != '') {
             $i++;
             $prefix = 'CRITERION.POS_' . sprintf('%02d', $i);
             $params[$prefix . '.POSITION'] = $i;
             $params[$prefix . '.QUANTITY'] = '1';
             $params[$prefix . '.UNIT'] = 'Stk.';
             $params[$prefix . '.AMOUNT_UNIT_GROSS'] = $prices['couponValue'] * 100;
             $params[$prefix . '.AMOUNT_GROSS'] = $prices['couponValue'] * 100;
             $params[$prefix . '.TEXT'] = 'Coupon';
             $params[$prefix . '.ARTICLE_NUMBER'] = 'Coupon';
             $params[$prefix . '.PERCENT_VAT'] = $prices['couponTax'];
             $params[$prefix . '.ARTICLE_TYPE'] = 'voucher';
         }
     }
     return $params;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:76,代码来源:heidelpay.php


示例14: _getPaymentResponseHtml

 /**
  * @param $method
  * @param $order
  * @return string
  */
 function _getPaymentResponseHtml($method, $order, $payments)
 {
     VmConfig::loadJLang('com_virtuemart_orders', TRUE);
     if (!class_exists('CurrencyDisplay')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     VmConfig::loadJLang('com_virtuemart_orders', TRUE);
     $totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total, $order['details']['BT']->order_currency);
     $cart = VirtueMartCart::getCart();
     $currencyDisplay = CurrencyDisplay::getInstance($cart->pricesCurrency);
     $payment = end($payments);
     $pluginName = $this->renderPluginName($method, $where = 'post_payment');
     $html = $this->renderByLayout('post_payment', array('order' => $order, 'paymentInfos' => $payment, 'pluginName' => $pluginName, 'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display']));
     //vmdebug('_getPaymentResponseHtml', $html,$pluginName,$paypalTable );
     return $html;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:24,代码来源:sofort.php


示例15: confirm

 /**
  * Executes the confirmDone task,
  * cart object checks itself, if the data is valid
  *
  * @author Max Milbers
  *
  *
  */
 public function confirm()
 {
     //Use false to prevent valid boolean to get deleted
     $cart = VirtueMartCart::getCart();
     if ($cart) {
         $cart->confirmDone();
         $view = $this->getView('cart', 'html');
         $view->setLayout('order_done');
         // Display it all
         $view->display();
     } else {
         $mainframe = JFactory::getApplication();
         $mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'), JText::_('COM_VIRTUEMART_CART_DATA_NOT_VALID'));
     }
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:23,代码来源:cart.php


示例16: display

 public function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $document = JFactory::getDocument();
     $layoutName = $this->getLayout();
     if (!$layoutName) {
         $layoutName = JRequest::getWord('layout', 'default');
     }
     $this->assignRef('layoutName', $layoutName);
     $format = JRequest::getWord('format');
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     $this->assignRef('cart', $cart);
     //Why is this here, when we have view.raw.php
     if ($format == 'raw') {
         $cart->prepareCartViewData();
         JRequest::setVar('layout', 'mini_cart');
         $this->setLayout('mini_cart');
         $this->prepareContinueLink();
     }
     /*
     	  if($layoutName=='edit_coupon'){
     
     		$cart->prepareCartViewData();
     		$this->lSelectCoupon();
     		$pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'),JRoute::_('index.php?option=com_virtuemart&view=cart'));
     		$pathway->addItem(JText::_('COM_VIRTUEMART_CART_SELECTCOUPON'));
     		$document->setTitle(JText::_('COM_VIRTUEMART_CART_SELECTCOUPON'));
     
     		} else */
     if ($layoutName == 'select_shipment') {
         if (!class_exists('vmPSPlugin')) {
             require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
         }
         JPluginHelper::importPlugin('vmshipment');
         $this->lSelectShipment();
         $pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart'));
         $pathway->addItem(JText::_('COM_VIRTUEMART_CART_SELECTSHIPMENT'));
         $document->setTitle(JText::_('COM_VIRTUEMART_CART_SELECTSHIPMENT'));
     } else {
         if ($layoutName == 'select_payment') {
             /* Load the cart helper */
             //			$cartModel = VmModel::getModel('cart');
             $this->lSelectPayment();
             $pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart'));
             $pathway->addItem(JText::_('COM_VIRTUEMART_CART_SELECTPAYMENT'));
             $document->setTitle(JText::_('COM_VIRTUEMART_CART_SELECTPAYMENT'));
         } else {
             if ($layoutName == 'order_done') {
                 $this->lOrderDone();
                 $pathway->addItem(JText::_('COM_VIRTUEMART_CART_THANKYOU'));
                 $document->setTitle(JText::_('COM_VIRTUEMART_CART_THANKYOU'));
             } else {
                 if ($layoutName == 'default') {
                     $cart->prepareCartViewData();
                     $cart->prepareAddressRadioSelection();
                     $this->prepareContinueLink();
                     $this->lSelectCoupon();
                     $currencyDisplay = CurrencyDisplay::getInstance($this->cart->pricesCurrency);
                     $this->assignRef('currencyDisplay', $currencyDisplay);
                     $totalInPaymentCurrency = $this->getTotalInPaymentCurrency();
                     $checkoutAdvertise = $this->getCheckoutAdvertise();
                     if ($cart && !VmConfig::get('use_as_catalog', 0)) {
                         $cart->checkout(false);
                     }
                     if ($cart->getDataValidated()) {
                         $pathway->addItem(JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU'));
                         $document->setTitle(JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU'));
                         $text = JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
                         $checkout_task = 'confirm';
                     } else {
                         $pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'));
                         $document->setTitle(JText::_('COM_VIRTUEMART_CART_OVERVIEW'));
                         $text = JText::_('COM_VIRTUEMART_CHECKOUT_TITLE');
                         $checkout_task = 'checkout';
                     }
                     $this->assignRef('checkout_task', $checkout_task);
                     $this->checkPaymentMethodsConfigured();
                     $this->checkShipmentMethodsConfigured();
                     if ($cart->virtuemart_shipmentmethod_id) {
                         $shippingText = JText::_('COM_VIRTUEMART_CART_CHANGE_SHIPPING');
                     } else {
                         $shippingText = JText::_('COM_VIRTUEMART_CART_EDIT_SHIPPING');
                     }
                     $this->assignRef('select_shipment_text', $shippingText);
                     if ($cart->virtuemart_paymentmethod_id) {
                         $paymentText = JText::_('COM_VIRTUEMART_CART_CHANGE_PAYMENT');
                     } else {
                         $paymentText = JText::_('COM_VIRTUEMART_CART_EDIT_PAYMENT');
                     }
                     $this->assignRef('select_payment_text', $paymentText);
                     if (!VmConfig::get('use_as_catalog')) {
                         $checkout_link_html = '<a class="vm-button-correct" href="javascript:document.checkoutForm.submit();" ><span>' . $text . '</span></a>';
                     } else {
                         $checkout_link_html = '';
                     }
                     $this->assignRef('checkout_link_html', $checkout_link_html);
//.........这里部分代码省略.........
开发者ID:Gskflute,项目名称:joomla25,代码行数:101,代码来源:view.html.php


示例17: plgVmOnPaymentResponseReceived

 function plgVmOnPaymentResponseReceived(&$html)
 {
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     if (!class_exists('shopFunctionsF')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $virtuemart_paymentmethod_id = JRequest::getInt('pm', 0);
     $order_number = JRequest::getString('on', 0);
     if (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {
         return null;
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return null;
     }
     if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) {
         return null;
     }
     if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) {
         return '';
     }
     $payment_name = $this->renderPluginName($method);
     $html = $this->_getPaymentResponseHtml($paymentTable, $payment_name);
     $cart = VirtueMartCart::getCart();
     $cart->emptyCart();
     return true;
 }
开发者ID:Pashkinz92,项目名称:oos,代码行数:31,代码来源:oos.php


示例18: getKlarnaPaymentCurrency

 function getKlarnaPaymentCurrency(&$method)
 {
     if (!class_exists('VirtueMartCart')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     $this->_getCartAddressCountryCode($cart, $country, $countrId);
     $cData = KlarnaHandler::countryData($method, $country);
     return shopFunctions::getCurrencyIDByName($cData['currency_code']);
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:10,代码来源:klarna.php


示例19: getCart

 /**
  * Get the cart from the session
  *
  * @author Max Milbers
  * @access public
  * @param array $cart the cart to store in the session
  */
 public static function getCart($setCart = true, $options = array())
 {
     if (empty(self::$_cart)) {
         $session = JFactory::getSession($options);
         $cartSession = $session->get('vmcart', 0, 'vm');
         self::$_cart = new VirtueMartCart();
         if (!empty($cartSession)) {
             $sessionCart = unserialize($cartSession);
             foreach (self::$sessionKeys as $k) {
                 self::$_cart->{$k} = $sessionCart->{$k};
             }
             self::$_cart->customer_comment = base64_decode($sessionCart->customer_comment);
         }
     }
     if ($setCart == true) {
         self::$_cart->setPreferred();
         self::$_cart->setCartIntoSession();
     }
     return self::$_cart;
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:27,代码来源:cart.php


示例20: setCountryState

 protected function setCountryState($cart = 0)
 {
     if ($this->_app->isAdmin()) {
         return;
     }
     if (empty($cart)) {
         if (!class_exists('VirtueMartCart')) {
             require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
         }
         $cart = VirtueMartCart::getCart();
     }
     $this->_cart = $cart;
     $stBased = VmConfig::get('taxSTbased', TRUE);
     if ($stBased and !empty($this->_cart->ST['virtuemart_country_id'])) {
         $this->_deliveryCountry = (int) $this->_cart->ST['virtuemart_country_id'];
     } else {
         if (!empty($this->_cart->BT['virtuemart_country_id'])) {
             $this->_deliveryCountry = (int) $this->_cart->BT['virtuemart_country_id'];
         }
     }
     if ($stBased and !empty($this->_cart->ST['virtuemart_state_id'])) {
         $this->_deliveryState = (int) $this->_cart->ST['virtuemart_state_id'];
     } else {
         if (!empty($cart->BT['virtuemart_state_id'])) {
             $this->_deliveryState = (int) $this->_cart->BT['virtuemart_state_id'];
         }
     }
     //vmdebug('setCountryState state '.$this->_deliveryState,$this->_cart->BT);
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:29,代码来源:calculationh.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP VirtueMartModelCustomfields类代码示例发布时间:2022-05-23
下一篇:
PHP VirtualHost类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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