本文整理匯總了PHP中Magento\Quote\Model\Quote::setMayEditShippingAddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP Quote::setMayEditShippingAddress方法的具體用法?PHP Quote::setMayEditShippingAddress怎麽用?PHP Quote::setMayEditShippingAddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Quote\Model\Quote
的用法示例。
在下文中一共展示了Quote::setMayEditShippingAddress方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateQuote
/**
* Update quote data
*
* @param Quote $quote
* @param array $details
* @return void
*/
private function updateQuote(Quote $quote, array $details)
{
$quote->setMayEditShippingAddress(false);
$quote->setMayEditShippingMethod(true);
$this->updateQuoteAddress($quote, $details);
$this->disabledQuoteAddressValidation($quote);
$quote->collectTotals();
$this->quoteRepository->save($quote);
}
示例2: prepareOrderReview
/**
* Check whether order review has enough data to initialize
*
* @param string|null $token
* @return void
* @throws \Magento\Framework\Exception\LocalizedException
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function prepareOrderReview($token = null)
{
$payment = $this->_quote->getPayment();
if (!$payment || !$payment->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_PAYER_ID)) {
throw new \Magento\Framework\Exception\LocalizedException(__('A payer is not identified.'));
}
$this->_quote->setMayEditShippingAddress(1 != $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_OVERRIDDEN));
$this->_quote->setMayEditShippingMethod('' == $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_METHOD));
$this->ignoreAddressValidation();
$this->_quote->collectTotals();
$this->quoteRepository->save($this->_quote);
}