Имя клиента не сохраняется в модуле onetepcheckout. Есть ли шаг, который я пропустил в порядке сохранения?
$shippingInfo = array(
'city'=> (string)$shippingAddress->City,
'country_id' => (string)$shippingAddress->CountryCode,
'email' => (string)$customerInfo->Email,
'firstname' => (string)$firstname,
'lastname' => (string)$lastname,
'postcode' => (string)$shippingAddress->PostalCode,
'street' => array( (string)$shippingAddress->AddressLine1, ),
'telephone' => (string)$shippingAddress->Phone,
'use_for_shipping' => '1',
'name'=>'hello there'
);
if(!empty($regionId)){
$shippingInfo['region_id'] = $regionId;
}
else{
$shippingInfo['region'] = $regionCode;
}
$quote = $this->getOnepage()->getQuote();
$quote->collectTotals()->save();
$quote->getBillingAddress()
->addData($shippingInfo);
$quote->getShippingAddress()
->addData($shippingInfo);
$quote->setCheckoutMethod('guest')
->setCustomerId(null)
->setCustomerEmail('test@example.com')
->setCustomerIsGuest(true)
->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID)->save();
$this->getOnepage()->saveOrder();
$this->getOnepage()->getQuote()->save();
magento-1.7
checkout
onepage-checkout
Влад Винников
источник
источник
class Amazon_Payments_Model_Observer extends Varien_Object { public function salesQuoteSaveAfter($observer) { $order = $observer->getEvent()->getOrder(); $order->setCustomerFirstname('ljslkdfjds'); $order->save();
getMethodInstance()
для необъекта вapp/code/core/Mage/Payment/Model/Observer.php
.обновление кода проверки решило мою проблему:
app/code/local/AW/Onestepcheckout/controllers/AjaxController.php
источник