This basically adds a new geozone for each country and autoselects each individual country. Then you can simply remove the countries you don't want to be part of that geozone and save.
1. EDIT: admin/view/template/localisation/geo_zone_form.tpl
2. FIND:
Code: Select all
<a onclick="addGeoZone();" class="button"><span class="button_left button_insert"></span><span class="button_middle"><?php echo $button_add_geo_zone; ?></span><span class="button_right"></span></a>
Code: Select all
<a onclick="addAllGeoZones();" class="button"><span class="button_left button_insert"></span><span class="button_middle">Add All Countries</span><span class="button_right"></span></a>
Code: Select all
<script type="text/javascript">
function addAllGeoZones() {
<?php foreach ($countries as $k => $v) { ?>
html = '<table class="green" id="zone_to_geo_zone_row' + zone_to_geo_zone_row + '">';
html += '<tr>';
html += '<td><?php echo $entry_country; ?><br /><select name="zone_to_geo_zone[' + zone_to_geo_zone_row + '][country_id]" id="country' + zone_to_geo_zone_row + '" onchange="$(\'#zone' + zone_to_geo_zone_row + '\').load(\'index.php?route=localisation/geo_zone/zone&country_id=\' + this.value + \'&zone_id=0\');">';
<?php foreach ($countries as $country) { ?>
html += '<option value="<?php echo $country['country_id']; ?>" <?php echo (($country['country_id']) == $k+1) ? 'selected="selected"' : ''; ?>><?php echo addslashes($country['name']); ?></option>';
<?php } ?>
html += '</select></td>';
html += '<td rowspan="2"><a onclick="$(\'#zone_to_geo_zone_row' + zone_to_geo_zone_row + '\').remove();" class="button"><span class="button_left button_delete"></span><span class="button_middle"><?php echo $button_remove; ?></span><span class="button_right"></span></a></td>';
html += '</tr>';
html += '<tr>';
html += '<td><?php echo $entry_zone; ?><br /><select name="zone_to_geo_zone[' + zone_to_geo_zone_row + '][zone_id]" id="zone' + zone_to_geo_zone_row + '"></select></td>';
html += '</tr>';
html += '</table>';
$('#zone_to_geo_zone').append(html);
$('#zone' + zone_to_geo_zone_row).load('index.php?route=localisation/geo_zone/zone&country_id=' + $('#country' + zone_to_geo_zone_row).attr('value') + '&zone_id=0');
zone_to_geo_zone_row++;
<?php } ?>
}
</script>