本文整理汇总了PHP中Mage_Sales_Model_Quote::getIsVirtual方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote::getIsVirtual方法的具体用法?PHP Mage_Sales_Model_Quote::getIsVirtual怎么用?PHP Mage_Sales_Model_Quote::getIsVirtual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote::getIsVirtual方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _ignoreAddressValidation
/**
* Make sure addresses will be saved without validation errors
*/
private function _ignoreAddressValidation()
{
$this->_quote->getBillingAddress()->setShouldIgnoreValidation(true);
if (!$this->_quote->getIsVirtual()) {
$this->_quote->getShippingAddress()->setShouldIgnoreValidation(true);
}
}
示例2: _beforeToHtml
/**
* Retrieve payment method and assign additional template values
*
* @return Mage_Paypal_Block_Express_Review
*/
protected function _beforeToHtml()
{
$methodInstance = $this->_quote->getPayment()->getMethodInstance();
$this->setPaymentMethodTitle($methodInstance->getTitle());
$this->setUpdateOrderSubmitUrl($this->getUrl("{$this->_paypalActionPrefix}/express/updateOrder"));
$this->setUpdateShippingMethodsUrl($this->getUrl("{$this->_paypalActionPrefix}/express/updateShippingMethods"));
$this->setShippingRateRequired(true);
if ($this->_quote->getIsVirtual()) {
$this->setShippingRateRequired(false);
} else {
// prepare shipping rates
$this->_address = $this->_quote->getShippingAddress();
$groups = $this->_address->getGroupedAllShippingRates();
if ($groups && $this->_address) {
$this->setShippingRateGroups($groups);
// determine current selected code & name
foreach ($groups as $code => $rates) {
foreach ($rates as $rate) {
if ($this->_address->getShippingMethod() == $rate->getCode()) {
$this->_currentShippingRate = $rate;
break 2;
}
}
}
}
// misc shipping parameters
$this->setShippingMethodSubmitUrl($this->getUrl("{$this->_paypalActionPrefix}/express/saveShippingMethod"))->setCanEditShippingAddress($this->_quote->getMayEditShippingAddress())->setCanEditShippingMethod($this->_quote->getMayEditShippingMethod());
}
$this->setEditUrl($this->getUrl("{$this->_paypalActionPrefix}/express/edit"))->setPlaceOrderUrl($this->getUrl("{$this->_paypalActionPrefix}/express/placeOrder"));
return parent::_beforeToHtml();
}
示例3: _beforeToHtml
/**
* Retrieve payment method and assign additional template values
*
* @return EbayEnterprise_Paypal_Block_Express_Review
*/
protected function _beforeToHtml()
{
$methodInstance = $this->_quote->getPayment()->getMethodInstance();
$this->setPaymentMethodTitle($methodInstance->getTitle());
$this->setShippingRateRequired(true);
if ($this->_quote->getIsVirtual()) {
$this->setShippingRateRequired(false);
} else {
// prepare shipping rates
$this->_address = $this->_quote->getShippingAddress();
$groups = $this->_address->getGroupedAllShippingRates();
if ($groups && $this->_address) {
$this->setShippingRateGroups($groups);
// determine current selected code & name
foreach ($groups as $rates) {
foreach ($rates as $rate) {
if ($this->_address->getShippingMethod() == $rate->getCode()) {
$this->_currentShippingRate = $rate;
break 2;
}
}
}
}
$canEditShippingAddress = $this->_quote->getMayEditShippingAddress() && $this->_quote->getPayment()->getAdditionalInformation(EbayEnterprise_PayPal_Model_Express_Checkout::PAYMENT_INFO_BUTTON) == 1;
// misc shipping parameters
$this->setShippingMethodSubmitUrl($this->getUrl("{$this->_paypalActionPrefix}/checkout/saveShippingMethod"))->setCanEditShippingAddress($canEditShippingAddress)->setCanEditShippingMethod($this->_quote->getMayEditShippingMethod());
}
$this->setEditUrl($this->getUrl("{$this->_paypalActionPrefix}/checkout/edit"))->setPlaceOrderUrl($this->getUrl("{$this->_paypalActionPrefix}/checkout/placeOrder"));
return parent::_beforeToHtml();
}
示例4: _beforeToHtml
/**
* Retrieve payment method and assign additional template values
*
* @return Mage_Paypal_Block_Express_Review
*/
protected function _beforeToHtml()
{
$methodInstance = $this->_quote->getPayment()->getMethodInstance();
$this->setPaymentMethodTitle($methodInstance->getTitle());
$this->setShippingRateRequired(true);
if ($this->_quote->getIsVirtual()) {
$this->setShippingRateRequired(false);
} else {
// prepare shipping rates
$this->_address = $this->_quote->getShippingAddress();
$groups = $this->_address->getGroupedAllShippingRates();
if ($groups && $this->_address) {
$this->setShippingRateGroups($groups);
// determine current selected code & name
foreach ($groups as $code => $rates) {
foreach ($rates as $rate) {
if ($this->_address->getShippingMethod() == $rate->getCode()) {
$this->_currentShippingRate = $rate;
break 2;
}
}
}
}
}
return parent::_beforeToHtml();
}
示例5: _ignoreAddressValidation
/**
* Make sure addresses will be saved without validation errors
*/
private function _ignoreAddressValidation()
{
$this->_quote->getBillingAddress()->setShouldIgnoreValidation(true);
if (!$this->_quote->getIsVirtual()) {
$this->_quote->getShippingAddress()->setShouldIgnoreValidation(true);
if (!$this->_config->requireBillingAddress && !$this->_quote->getBillingAddress()->getEmail()) {
$this->_quote->getBillingAddress()->setSameAsBilling(1);
}
}
}
示例6: toOrder
/**
* Convert quote model to order model
*
* @param Mage_Sales_Model_Quote $quote
* @return Mage_Sales_Model_Order
*/
public function toOrder(Mage_Sales_Model_Quote $quote, $order = null)
{
if (!$order instanceof Mage_Sales_Model_Order) {
$order = Mage::getModel('sales/order');
}
/* @var $order Mage_Sales_Model_Order */
$order->setStoreId($quote->getStoreId())->setQuoteId($quote->getId())->setRemoteIp($quote->getRemoteIp())->setCustomerId($quote->getCustomerId())->setCustomerEmail($quote->getCustomerEmail())->setCustomerFirstname($quote->getCustomerFirstname())->setCustomerLastname($quote->getCustomerLastname())->setCustomerGroupId($quote->getCustomerGroupId())->setCustomerTaxClassId($quote->getCustomerTaxClassId())->setCustomerNote($quote->getCustomerNote())->setCustomerNoteNotify($quote->getCustomerNoteNotify())->setCustomerIsGuest($quote->getCustomerIsGuest())->setBaseCurrencyCode($quote->getBaseCurrencyCode())->setStoreCurrencyCode($quote->getStoreCurrencyCode())->setOrderCurrencyCode($quote->getQuoteCurrencyCode())->setStoreToBaseRate($quote->getStoreToBaseRate())->setStoreToOrderRate($quote->getStoreToQuoteRate())->setCouponCode($quote->getCouponCode())->setGiftcertCode($quote->getGiftcertCode())->setIsVirtual($quote->getIsVirtual())->setIsMultiPayment($quote->getIsMultiPayment())->setAppliedRuleIds($quote->getAppliedRuleIds());
Mage::dispatchEvent('sales_convert_quote_to_order', array('order' => $order, 'quote' => $quote));
return $order;
}
示例7: isVirtual
/**
* Return quote virtual status
*
* @return bool
*/
public function isVirtual()
{
return $this->_quote->getIsVirtual();
}