Skip to content

Commit

Permalink
Load countries directory select by store (OpenMage#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
fplantinet authored and colinmollenhour committed May 20, 2019
1 parent fe897da commit 6c0c9b3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public function getAllOptions()
$options = unserialize($cache);
} else {
$collection = Mage::getModel('directory/country')->getResourceCollection();
if (!Mage::app()->getStore()->isAdmin()) {
$collection->loadByStore();
}
$options = $collection->toOptionArray();
if (Mage::app()->useCache('config')) {
Mage::app()->saveCache(serialize($options), $cacheKey, array('config'));
Expand Down

0 comments on commit 6c0c9b3

Please sign in to comment.