O nome do cliente não está sendo salvo no módulo onestepcheckout. Há uma etapa que eu perdi na ordem de salvamento?
$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('[email protected]')
->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
Vlad Vinnikov
fonte
fonte
class Amazon_Payments_Model_Observer extends Varien_Object { public function salesQuoteSaveAfter($observer) { $order = $observer->getEvent()->getOrder(); $order->setCustomerFirstname('ljslkdfjds'); $order->save();
getMethodInstance()
em um não-objeto emapp/code/core/Mage/Payment/Model/Observer.php
.atualizar o código do checkout resolveu meu problema:
app/code/local/AW/Onestepcheckout/controllers/AjaxController.php
fonte