我们收到了以下 Magento 核心补丁:
Index: app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
===================================================================
--- app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php (working copy)
@@ -718,6 +718,7 @@
$addressId = $this->getRequest()->getParam('address_id');
$address = Mage::getModel('sales/order_address')
->getCollection()
+ ->addFilter('entity_id', $addressId)
->getItemById($addressId);
if ($address) {
Mage::register('order_address', $address);
在我看来,这相当于
$addressId = $this->getRequest()->getParam('address_id');
$address = Mage::getModel('sales/order_address')->load($addressId);
if ($address->getId()) {
Mage::register('order_address', $address);
与我的解决方案相比,原始补丁的优势是什么?
编辑:
来自支持的解释是:
[...] 此决定是设计使然,并且在创建此代码时是适当的。