findOneByByDefault(true); if ($dc == null) throw new \LogicException(Translator::getInstance()->trans("Cannot find a default country. Please define one.")); return $dc; } /** * Return the shop country * * @throws LogicException if no shop country is defined */ public static function getShopLocation() { $dc = CountryQuery::create()->findOneByShopCountry(true); if ($dc == null) throw new \LogicException(Translator::getInstance()->trans("Cannot find the shop country. Please select a shop country.")); return $dc; } }