El nombre del cliente no se guarda en el módulo onestepcheckout. ¿Hay un paso que perdí al guardar el orden?
$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
fuente
fuente
class Amazon_Payments_Model_Observer extends Varien_Object { public function salesQuoteSaveAfter($observer) { $order = $observer->getEvent()->getOrder(); $order->setCustomerFirstname('ljslkdfjds'); $order->save();
getMethodInstance()
en un no objeto enapp/code/core/Mage/Payment/Model/Observer.php
.actualizar el código de pago resolvió mi problema:
app/code/local/AW/Onestepcheckout/controllers/AjaxController.php
fuente