Nama pelanggan tidak disimpan dalam modul check-out onestep. Apakah ada langkah yang saya lewatkan dalam menghemat?
$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
sumber
sumber
class Amazon_Payments_Model_Observer extends Varien_Object { public function salesQuoteSaveAfter($observer) { $order = $observer->getEvent()->getOrder(); $order->setCustomerFirstname('ljslkdfjds'); $order->save();
getMethodInstance()
pada non-objek diapp/code/core/Mage/Payment/Model/Observer.php
.memperbarui kode checkout menyelesaikan masalah saya:
app/code/local/AW/Onestepcheckout/controllers/AjaxController.php
sumber