diff --git a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php index 1b945fe1c02..bbc8e9c4e34 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php @@ -117,6 +117,9 @@ protected function _getLoadAttributesSelect($object, $table) ->from(['attr_table' => $table], []) ->where("attr_table.{$this->getEntityIdField()} = ?", $object->getId()) ->where('attr_table.store_id IN (?)', $storeIds); + if (count($storeIds) > 1) { + $select->order('attr_table.store_id ASC'); + } if ($setId) { $select->join( ['set_table' => $this->getTable('eav/entity_attribute')], diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php index b988a47590b..d24c447c747 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php @@ -145,6 +145,8 @@ public function loadByCode($entityType, $code) $this->_getResource()->loadByCode($this, $entityTypeId, $code); } $this->_afterLoad(); + $this->setOrigData(); + $this->_hasDataChanges = false; Varien_Profiler::stop('_LOAD_ATTRIBUTE_BY_CODE__'); return $this; } diff --git a/lib/Varien/Image/Adapter.php b/lib/Varien/Image/Adapter.php index 9a8ab7e2f3e..b4e3b794eee 100644 --- a/lib/Varien/Image/Adapter.php +++ b/lib/Varien/Image/Adapter.php @@ -18,7 +18,6 @@ class Varien_Image_Adapter public const ADAPTER_GD = 'GD'; public const ADAPTER_GD2 = 'GD2'; public const ADAPTER_IM = 'IMAGEMAGIC'; - public const ADAPTER_IME = 'IMAGEMAGIC_EXTERNAL'; public static function factory($adapter) { @@ -35,10 +34,6 @@ public static function factory($adapter) return new Varien_Image_Adapter_Imagemagic(); break; - case self::ADAPTER_IME: - return new Varien_Image_Adapter_ImagemagicExternal(); - break; - default: throw new Exception('Invalid adapter selected.'); break;