本文整理汇总了PHP中oxSession::hasVar方法的典型用法代码示例。如果您正苦于以下问题:PHP oxSession::hasVar方法的具体用法?PHP oxSession::hasVar怎么用?PHP oxSession::hasVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxSession
的用法示例。
在下文中一共展示了oxSession::hasVar方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getFileName
protected function _getFileName()
{
$sFileName = '';
if (oxSession::hasVar('debugPHP') && oxSession::getVar('debugPHP') !== true) {
$sFileName = oxSession::getVar('debugPHP');
}
return $sFileName .= isAdmin() ? '_admin' : '_shop';
}
示例2: executePayment
/**
* @overload
*/
public function executePayment($dAmount, &$oOrder)
{
if (!in_array($oOrder->oxorder__oxpaymenttype->rawValue, array("paymill_cc", "paymill_elv"))) {
return parent::executePayment($dAmount, $oOrder);
}
if (oxSession::hasVar('paymill_token')) {
$this->_token = oxSession::getVar('paymill_token');
} else {
oxUtilsView::getInstance()->addErrorToDisplay("No Token was provided");
oxUtils::getInstance()->redirect($this->getConfig()->getSslShopUrl() . 'index.php?cl=payment', false);
}
$this->getSession()->setVar("paymill_identifier", time());
$this->_apiUrl = paymill_util::API_ENDPOINT;
$this->_iLastErrorNo = null;
$this->_sLastError = null;
$this->_initializePaymentProcessor($dAmount, $oOrder);
if ($this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue) === 'cc') {
$this->_paymentProcessor->setPreAuthAmount((int) oxSession::getVar('paymill_authorized_amount'));
}
$this->_loadFastCheckoutData();
$this->_existingClientHandling($oOrder);
if ($this->_token === 'dummyToken') {
$prop = 'paymill_fastcheckout__paymentid_' . $this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue);
$this->_paymentProcessor->setPaymentId($this->_fastCheckoutData->{$prop}->rawValue);
}
$result = $this->_paymentProcessor->processPayment();
$this->log($result ? 'Payment results in success' : 'Payment results in failure', null);
if ($result) {
$saveData = array('oxid' => $oOrder->oxorder__oxuserid->rawValue, 'clientid' => $this->_paymentProcessor->getClientId());
if (oxConfig::getInstance()->getShopConfVar('PAYMILL_ACTIVATE_FASTCHECKOUT')) {
$paymentColumn = 'paymentID_' . strtoupper($this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue));
$saveData[$paymentColumn] = $this->_paymentProcessor->getPaymentId();
}
$this->_fastCheckoutData->assign($saveData);
$this->_fastCheckoutData->save();
if (oxConfig::getInstance()->getShopConfVar('PAYMILL_SET_PAYMENTDATE')) {
$this->_setPaymentDate($oOrder);
}
// set transactionId to session for updating the description after order execute
$transactionId = $this->_paymentProcessor->getTransactionId();
$this->getSession()->setVar('paymillPgTransId', $transactionId);
} else {
oxUtilsView::getInstance()->addErrorToDisplay($this->_getErrorMessage($this->_paymentProcessor->getErrorCode()));
}
return $result;
}
示例3: showBackToShop
/**
* return the Link back to shop
*
* @return bool
*/
public function showBackToShop()
{
return $this->getConfig()->getConfigParam('iNewBasketItemMessage') == 3 && oxSession::hasVar('_backtoshop');
}
示例4: setSearchText
public function setSearchText()
{
$aConfig = $this->getConfigFile();
if ($aConfig['filter']['search'] == 1 && !empty($aConfig['filter']['sSearchText']) && (!oxSession::hasVar('debugPHPSearch') || oxSession::getVar('debugPHPSearch') != $aConfig['filter']['sSearchText'])) {
oxSession::setVar('debugPHPSearch', $aConfig['filter']['sSearchText']);
}
}