Exemple #1
0
				<td class="adm-detail-content-cell-r">

					<?php 
            if ($lpEnabled) {
                ?>

						<?php 
                /*<a href="<?=\Bitrix\Sale\Location\Admin\SiteLocationHelper::getListUrl();?>"><?=GetMessage('SMO_LOCATION_SALES_ZONE_SELECT')?></a>*/
                ?>

					<?php 
            } else {
                ?>

						<?php 
                $sales_zone_countries = \Bitrix\Sale\SalesZone::getCountriesIds($siteList[$i]["ID"]);
                $sales_zone_regions = \Bitrix\Sale\SalesZone::getRegionsIds($siteList[$i]["ID"]);
                $sales_zone_cities = \Bitrix\Sale\SalesZone::getCitiesIds($siteList[$i]["ID"]);
                ?>

						<table><tr>
								<th><?php 
                echo GetMessage("SMO_LOCATION_COUNTRIES");
                ?>
</th>
								<th><?php 
                echo GetMessage("SMO_LOCATION_REGIONS");
                ?>
</th>
								<th><?php 
                echo GetMessage("SMO_LOCATION_CITIES");
Exemple #2
0
 public static function convertSalesZones()
 {
     $siteList = \CSaleLocation::getSites();
     $siteList[] = '';
     // 'empty site' too
     foreach ($siteList as $siteId) {
         $countries = Sale\SalesZone::getCountriesIds($siteId);
         $regions = Sale\SalesZone::getRegionsIds($siteId);
         $cities = Sale\SalesZone::getCitiesIds($siteId);
         if (empty($countries) && empty($regions) && empty($cities)) {
             continue;
         }
         Sale\SalesZone::saveSelectedTypes(array('COUNTRY' => $countries, 'REGION' => $regions, 'CITY' => $cities), $siteId);
     }
 }