//reorganization of shipping menus & options
This commit is contained in:
@@ -101,54 +101,6 @@ class AdminCarriersControllerCore extends AdminController
|
||||
)
|
||||
);
|
||||
|
||||
$carrier_default_sort = array(
|
||||
array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')),
|
||||
array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position'))
|
||||
);
|
||||
|
||||
$carrier_default_order = array(
|
||||
array('value' => Carrier::SORT_BY_ASC, 'name' => $this->l('Ascending')),
|
||||
array('value' => Carrier::SORT_BY_DESC, 'name' => $this->l('Descending'))
|
||||
);
|
||||
|
||||
$this->fields_options = array(
|
||||
'general' => array(
|
||||
'title' => $this->l('Carrier options'),
|
||||
'fields' => array(
|
||||
'PS_CARRIER_DEFAULT' => array(
|
||||
'title' => $this->l('Default carrier:'),
|
||||
'desc' => $this->l('Your shop\'s default carrier'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'id_carrier',
|
||||
'list' => array_merge(
|
||||
array(
|
||||
-1 => array('id_carrier' => -1, 'name' => $this->l('Best price')),
|
||||
-2 => array('id_carrier' => -2, 'name' => $this->l('Best grade'))
|
||||
),
|
||||
Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS))
|
||||
),
|
||||
'PS_CARRIER_DEFAULT_SORT' => array(
|
||||
'title' => $this->l('Sort by:'),
|
||||
'desc' => $this->l('This will only be visible in the Front Office'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'value',
|
||||
'list' => $carrier_default_sort
|
||||
),
|
||||
'PS_CARRIER_DEFAULT_ORDER' => array(
|
||||
'title' => $this->l('Order by:'),
|
||||
'desc' => $this->l('This will only be visible in the Front Office'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'value',
|
||||
'list' => $carrier_default_order
|
||||
),
|
||||
),
|
||||
'submit' => array()
|
||||
)
|
||||
);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,17 @@ class AdminShippingControllerCore extends AdminController
|
||||
foreach ($carriers as $key => $carrier)
|
||||
if ($carrier['is_free'])
|
||||
unset($carriers[$key]);
|
||||
|
||||
$carrier_default_sort = array(
|
||||
array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')),
|
||||
array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position'))
|
||||
);
|
||||
|
||||
$carrier_default_order = array(
|
||||
array('value' => Carrier::SORT_BY_ASC, 'name' => $this->l('Ascending')),
|
||||
array('value' => Carrier::SORT_BY_DESC, 'name' => $this->l('Descending'))
|
||||
);
|
||||
|
||||
$this->fields_options = array(
|
||||
'handling' => array(
|
||||
'title' => $this->l('Handling'),
|
||||
@@ -68,12 +78,45 @@ class AdminShippingControllerCore extends AdminController
|
||||
<li>'.$this->l('Coupons are not taken into account when calculating free shipping').'</li>
|
||||
</ul>',
|
||||
'submit' => array()
|
||||
),
|
||||
'general' => array(
|
||||
'title' => $this->l('Carrier options'),
|
||||
'fields' => array(
|
||||
'PS_CARRIER_DEFAULT' => array(
|
||||
'title' => $this->l('Default carrier:'),
|
||||
'desc' => $this->l('Your shop\'s default carrier'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'id_carrier',
|
||||
'list' => array_merge(
|
||||
array(
|
||||
-1 => array('id_carrier' => -1, 'name' => $this->l('Best price')),
|
||||
-2 => array('id_carrier' => -2, 'name' => $this->l('Best grade'))
|
||||
),
|
||||
Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS))
|
||||
),
|
||||
'PS_CARRIER_DEFAULT_SORT' => array(
|
||||
'title' => $this->l('Sort by:'),
|
||||
'desc' => $this->l('This will only be visible in the Front Office'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'value',
|
||||
'list' => $carrier_default_sort
|
||||
),
|
||||
'PS_CARRIER_DEFAULT_ORDER' => array(
|
||||
'title' => $this->l('Order by:'),
|
||||
'desc' => $this->l('This will only be visible in the Front Office'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'value',
|
||||
'list' => $carrier_default_order
|
||||
),
|
||||
),
|
||||
'submit' => array()
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
/* Shipping fees */
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
<tab id="Price_Rules" id_parent="" active="1">
|
||||
<class_name>AdminPriceRule</class_name>
|
||||
</tab>
|
||||
<tab id="Shipping" id_parent="" active="1">
|
||||
<class_name>AdminParentShipping</class_name>
|
||||
</tab>
|
||||
<tab id="Localization" id_parent="" active="1">
|
||||
<class_name>AdminParentLocalization</class_name>
|
||||
</tab>
|
||||
@@ -150,12 +147,6 @@
|
||||
<tab id="Marketing" id_parent="Price_Rules" active="1">
|
||||
<class_name>AdminMarketing</class_name>
|
||||
</tab>
|
||||
<tab id="Shipping_1" id_parent="Shipping" active="1">
|
||||
<class_name>AdminShipping</class_name>
|
||||
</tab>
|
||||
<tab id="Carriers" id_parent="Shipping" active="1">
|
||||
<class_name>AdminCarriers</class_name>
|
||||
</tab>
|
||||
<tab id="CarrierWizard" id_parent="Shipping" active="1">
|
||||
<class_name>AdminCarrierWizard</class_name>
|
||||
</tab>
|
||||
@@ -198,6 +189,9 @@
|
||||
<tab id="Payment" id_parent="Modules" active="1">
|
||||
<class_name>AdminPayment</class_name>
|
||||
</tab>
|
||||
<tab id="Carriers" id_parent="Modules" active="1">
|
||||
<class_name>AdminCarriers</class_name>
|
||||
</tab>
|
||||
<tab id="General" id_parent="Preferences" active="1">
|
||||
<class_name>AdminPreferences</class_name>
|
||||
</tab>
|
||||
@@ -210,6 +204,9 @@
|
||||
<tab id="Customers_2" id_parent="Preferences" active="1">
|
||||
<class_name>AdminCustomerPreferences</class_name>
|
||||
</tab>
|
||||
<tab id="Shipping" id_parent="Preferences" active="1">
|
||||
<class_name>AdminShipping</class_name>
|
||||
</tab>
|
||||
<tab id="Themes" id_parent="Preferences" active="1">
|
||||
<class_name>AdminThemes</class_name>
|
||||
</tab>
|
||||
|
||||
@@ -22,6 +22,14 @@ CHANGE `module_name` `module_name` VARCHAR(64) NULL DEFAULT NULL;
|
||||
/* PHP:remove_tab(AdminRangePrice); */;
|
||||
/* PHP:remove_tab(AdminRangeWeight); */;
|
||||
|
||||
/* PHP:remove_tab(AdminShipping); */;
|
||||
/* PHP:remove_tab(AdminParentShipping); */;
|
||||
/* PHP:remove_tab(AdminCarriers); */;
|
||||
|
||||
/* PHP:add_new_tab(AdminShipping, es:Shipping|it:Shipping|en:Shipping|de:Shipping|fr:Transport, 0, false, AdminParentPreferences); */;
|
||||
/* PHP:add_new_tab(AdminCarriers, es:Carriers|it:Carriers|en:Carriers|de:Carriers|fr:Tarsporteurs, 0, false, AdminParentModules); */;
|
||||
|
||||
|
||||
ALTER TABLE `PREFIX_log` ADD `id_employee` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `object_id`;
|
||||
|
||||
SET @id_parent = (SELECT IFNULL(id_tab, 1) FROM `PREFIX_tab` WHERE `class_name` = 'AdminPriceRule' LIMIT 1);
|
||||
|
||||
Reference in New Issue
Block a user