-

+
diff --git a/classes/Carrier.php b/classes/Carrier.php
index 3c3f5039a..b32a19397 100644
--- a/classes/Carrier.php
+++ b/classes/Carrier.php
@@ -1290,7 +1290,7 @@ class CarrierCore extends ObjectModel
public function setGroups($groups, $delete = true)
{
if ($delete)
- Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id_carrier);
+ Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$this->id);
if (!count($groups))
return true;
$sql = 'INSERT INTO '._DB_PREFIX_.'carrier_group (id_carrier, id_group) VALUES ';
diff --git a/controllers/admin/AdminCarrierWizardController.php b/controllers/admin/AdminCarrierWizardController.php
index b06664c6f..9081acad2 100644
--- a/controllers/admin/AdminCarrierWizardController.php
+++ b/controllers/admin/AdminCarrierWizardController.php
@@ -224,26 +224,6 @@ class AdminCarrierWizardControllerCore extends AdminController
'form' => array(
'id_form' => 'step_carrier_ranges',
'input' => array(
- array(
- 'type' => 'radio',
- 'label' => $this->l('Apply shipping cost:'),
- 'name' => 'is_free',
- 'required' => false,
- 'class' => 't',
- 'values' => array(
- array(
- 'id' => 'is_free_off',
- 'value' => 0,
- 'label' => '
'
- ),
- array(
- 'id' => 'is_free_on',
- 'value' => 1,
- 'label' => '
'
- )
- ),
- 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.')
- ),
array(
'type' => 'radio',
'label' => $this->l('Shipping and handling:'),
@@ -265,6 +245,26 @@ class AdminCarrierWizardControllerCore extends AdminController
),
'desc' => $this->l('Include the shipping and handling costs in the carrier price.')
),
+ array(
+ 'type' => 'radio',
+ 'label' => $this->l('Apply shipping cost:'),
+ 'name' => 'is_free',
+ 'required' => false,
+ 'class' => 't',
+ 'values' => array(
+ array(
+ 'id' => 'is_free_off',
+ 'value' => 0,
+ 'label' => '
'
+ ),
+ array(
+ 'id' => 'is_free_on',
+ 'value' => 1,
+ 'label' => '
'
+ )
+ ),
+ 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.')
+ ),
array(
'type' => 'radio',
'label' => $this->l('Billing:'),
diff --git a/css/admin.css b/css/admin.css
index b67c2ede3..8cae37760 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -2517,4 +2517,6 @@ margin-bottom:7px;
#carrier_wizard #zones_table input[type=text] {width: 45px;}
-#carrier_logo_block{position: absolute;right: 15px;}
\ No newline at end of file
+#carrier_logo_block{position: absolute;right: 15px;}
+
+#carrier_wizard #fieldset_form { min-height: 190px}
diff --git a/img/admin/carrier-default.jpg b/img/admin/carrier-default.jpg
new file mode 100644
index 000000000..5677b65c1
Binary files /dev/null and b/img/admin/carrier-default.jpg differ
diff --git a/js/admin_carrier_wizard.js b/js/admin_carrier_wizard.js
index 71a943eff..ebeeff76f 100644
--- a/js/admin_carrier_wizard.js
+++ b/js/admin_carrier_wizard.js
@@ -214,6 +214,7 @@ function bind_inputs()
$('tr.fees').each( function () {
$(this).children('td:eq('+index+')').remove();
});
+ rebuildTabindex();
return false;
});
@@ -270,7 +271,7 @@ function bind_inputs()
var is_free = $(this);
$("#step_carrier_ranges .margin-form").each(function() {
var field = $(this).children().attr('name');
- if (typeof(field) != 'undefined' && field != 'is_free')
+ if (typeof(field) != 'undefined' && field != 'is_free' && field != 'shipping_handling')
{
if (parseInt(is_free.val()))
{
@@ -294,6 +295,7 @@ function bind_inputs()
$('#zones_table').show();
$('.new_range').show();
}
+ resizeWizard();
});
$('input[name="is_free"]:checked').click();
@@ -400,13 +402,14 @@ function add_new_range()
$('tr.fees_all td:last').after('
');
$('tr.fees').each( function () {
- $(this).children('td:last').after(' | | ');
+ $(this).children('td:last').after('
| ');
});
$('tr.delete_range td:last').after('
');
resizeWizard();
bind_inputs();
-
+ rebuildTabindex();
+
return false;
}
@@ -415,3 +418,24 @@ function delete_new_range()
if ($('#new_range_form_placeholder').children('td').length = 1)
return false;
}
+
+
+function rebuildTabindex()
+{
+ i = 1;
+ zones_nbr +=3; // corresponds to the third input text (max, min and all)
+ $('#zones_table tr').each( function ()
+ {
+ $(this).children('td').each( function ()
+ {
+ if ($(this).index() > 2)
+ j = i + zones_nbr;
+ else if ($(this).index() == 2)
+ j = i;
+
+ if ($(this).index() >= 2 && $(this).find('input'))
+ $(this).find('input').attr('tabindex', j);
+ });
+ i ++;
+ });
+}
\ No newline at end of file
|