Created
November 6, 2015 08:38
-
-
Save maximzasorin/723d29f54d7a853b3308 to your computer and use it in GitHub Desktop.
Выбор первой области по умолчанию при оформлении заказа (HostCMS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$oShopCountry = Core_Entity::factory('shop_country', $oShop->shop_country_id); | |
if ($oShopCountry) | |
{ | |
$aoShopCountryLocations = $oShopCountry | |
->Shop_Country_Locations | |
->findAll(); | |
$oShopCountryLocation = $aoShopCountryLocations[0]; | |
if ($oShopCountryLocation) | |
{ | |
$aoShopCountryLocationCities = $oShopCountryLocation | |
->Shop_Country_Location_Cities | |
->findAll(); | |
$Shop_Address_Controller_Show | |
->addEntities($aoShopCountryLocations) | |
->addEntity( | |
Core::factory('Core_Xml_Entity') | |
->name('current_shop_country_location_id') | |
->value($oShopCountryLocation->id) | |
) | |
->addEntities($aoShopCountryLocationCities); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment