Пример #1
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);
     }
 }
Пример #2
0
					<?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");
                ?>
Пример #3
0
        echo "<option value=\"" . $siteList[$i]["ID"] . "\">" . $siteList[$i]["NAME"] . "</option>";
    }
    ?>
</select><input type="hidden" name="ADDRESS_current_site" id="ADDRESS_current_site" value="<?php 
    echo $siteList[0]["ID"];
    ?>
" /></td>
	</tr>
	<tr>
		<td colspan="2" valign="top">
<?php 
    for ($i = 0; $i < $siteCount; $i++) {
        $location_zip = COption::GetOptionString('sale', 'location_zip', '', $siteList[$i]["ID"]);
        $location = intval(COption::GetOptionString('sale', 'location', '', $siteList[$i]["ID"]));
        $sales_zone_countries = SalesZone::getCountriesIds($siteList[$i]["ID"]);
        $sales_zone_regions = SalesZone::getRegionsIds($siteList[$i]["ID"]);
        $sales_zone_cities = SalesZone::getCitiesIds($siteList[$i]["ID"]);
        if ($location_zip == 0) {
            $location_zip = '';
        }
        ?>
		<div  id="par_ADDRESS_<?php 
        echo $siteList[$i]["ID"];
        ?>
" style="display: <?php 
        echo $i == 0 ? "inline" : "none";
        ?>
">
		<table cellpadding="0" cellspacing="2" border="0" width="60%" align="center">
			<tr class="heading">
				<td align="center" colspan="2"><?php