// fix validation rules
This commit is contained in:
@@ -463,6 +463,23 @@ class CarrierCore extends ObjectModel
|
|||||||
|
|
||||||
return $carriers;
|
return $carriers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getIdTaxRulesGroupMostUsed()
|
||||||
|
{
|
||||||
|
return Db::getInstance()->getValue('
|
||||||
|
SELECT id_tax_rules_group
|
||||||
|
FROM (
|
||||||
|
SELECT COUNT(*) n, carrier_shop.id_tax_rules_group
|
||||||
|
FROM '._DB_PREFIX_.'carrier c
|
||||||
|
'.Shop::addSqlAssociation('carrier', 'c').'
|
||||||
|
JOIN '._DB_PREFIX_.'tax_rules_group trg ON (carrier_shop.id_tax_rules_group = trg.id_tax_rules_group)
|
||||||
|
WHERE trg.active = 1
|
||||||
|
GROUP BY carrier.id_tax_rules_group
|
||||||
|
ORDER BY n DESC
|
||||||
|
LIMIT 1
|
||||||
|
) most_used'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static function getDeliveredCountries($id_lang, $active_countries = false, $active_carriers = false, $contain_states = null)
|
public static function getDeliveredCountries($id_lang, $active_countries = false, $active_carriers = false, $contain_states = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -672,7 +672,11 @@ class AdminCarrierWizardControllerCore extends AdminController
|
|||||||
if (Shop::isFeatureActive())
|
if (Shop::isFeatureActive())
|
||||||
{
|
{
|
||||||
$multistore_field = array(array('shop'));
|
$multistore_field = array(array('shop'));
|
||||||
array_splice($step_fields, 1, 0, $multistore_field);
|
$tmp = $step_fields;
|
||||||
|
$step_fields = array(1 => $tmp[1]) + $multistore_field;
|
||||||
|
array_shift($tmp);
|
||||||
|
foreach ($tmp as $row)
|
||||||
|
$step_field[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules = array();
|
$rules = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user