本文整理汇总了PHP中Mage_Sales_Model_Quote::getData方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote::getData方法的具体用法?PHP Mage_Sales_Model_Quote::getData怎么用?PHP Mage_Sales_Model_Quote::getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote::getData方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _addErrorMessage
/**
* Add error message if estimation has error
*
* @param Mage_Sales_Model_Quote $quote
* @return $this
*/
protected function _addErrorMessage($quote)
{
if ($quote->getData('estimate_tax_error')) {
$this->_getErrorsHelper()->addErrorMessage($quote);
}
return $this;
}
示例2: resetQuote
protected function resetQuote(Mage_Sales_Model_Quote $quote)
{
if (!$quote->getData('__applied_rules_reset__')) {
$quote->setAppliedRuleIds('');
$quote->setData('__applied_rules_reset__', true);
}
}
示例3: getCouponCode
public function getCouponCode($all = false)
{
if (in_array(Mage::app()->getRequest()->getActionName(), array('couponPost', 'add_coupon'))) {
if ($all) {
return parent::getData('coupon_code');
}
$coupons = explode(',', parent::getData('coupon_code'));
if (count($coupons)) {
//return the last added, for the right validation
return $coupons[count($coupons) - 1];
}
}
return parent::getData('coupon_code');
}
示例4: isQuoteAdyenSubscription
/**
* @param Mage_Sales_Model_Quote $quote
*
* @return mixed|Varien_Object
*/
public function isQuoteAdyenSubscription(Mage_Sales_Model_Quote $quote)
{
if (!$quote->hasData('_is_adyen_subscription')) {
foreach ($quote->getAllItems() as $quoteItem) {
/** @var Mage_Sales_Model_Quote_Item $quoteItem */
$additionalOptions = $quoteItem->getOptionByCode('additional_options');
if (!$additionalOptions) {
continue;
}
$options = unserialize($additionalOptions->getValue());
foreach ($options as $option) {
if ($option['code'] == 'adyen_subscription' && $option['option_value'] != 'none') {
$quote->setData('_is_adyen_subscription', true);
$quoteItem->setData('_adyen_subscription', $option['option_value']);
return $quote->getData('_is_adyen_subscription');
}
}
}
$quote->setData('_is_adyen_subscription', false);
}
return $quote->getData('_is_adyen_subscription');
}
示例5: fullStopOnError
/**
* Returns full stop on error
*
* @param Mage_Sales_Model_Quote $quote
* @return bool
*/
public function fullStopOnError($quote)
{
if ($quote->getData('estimate_tax_error') && $this->_getFullStopOnErrorMode($quote->getStoreId())) {
return true;
} else {
return false;
}
}
示例6: _anonymizeQuote
/**
* @param Mage_Sales_Model_Quote $quote
* @param array $randomData
*/
protected function _anonymizeQuote($quote, $randomData)
{
/** @var $quote Mage_Sales_Model_Quote */
foreach ($this->_getQuoteMapping() as $quoteKey => $randomDataKey) {
if (!$quote->getData($quoteKey)) {
continue;
}
if (strlen($randomDataKey)) {
$quote->setData($quoteKey, $randomData[$randomDataKey]);
} else {
$quote->setData($quoteKey, '');
}
}
$quote->getResource()->save($quote);
$this->_anonymizedQuoteIds[] = $quote->getId();
}
示例7: isCcSaveAllowed
/**
* Check if the "Save this card" feature is allowed
* (for any not-guest order, child customerstored method should be active)
*
* @param Mage_Sales_Model_Quote $quote
* @param string $paymentMethodCode
* @return bool
*/
public function isCcSaveAllowed($quote, $paymentMethodCode)
{
if (!$paymentMethodCode) {
return false;
} else {
// @todo Adjust this code if 'customerstored' methods naming convention will change
$customerstoredPaymentMethodCode = $paymentMethodCode . '_customerstored';
}
if ($quote && !($quote->getData('checkout_method') == Mage_Checkout_Model_Type_Onepage::METHOD_GUEST || $quote->getData('customer_is_guest')) && Mage::getStoreConfig("payment/{$customerstoredPaymentMethodCode}/active", $quote->getStoreId())) {
return true;
}
return false;
}