// forgot someting
This commit is contained in:
+3
-4
@@ -469,12 +469,11 @@ class CarrierCore extends ObjectModel
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT id_tax_rules_group
|
||||
FROM (
|
||||
SELECT COUNT(*) n, carrier_shop.id_tax_rules_group
|
||||
SELECT COUNT(*) n, c.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)
|
||||
JOIN '._DB_PREFIX_.'tax_rules_group trg ON (c.id_tax_rules_group = trg.id_tax_rules_group)
|
||||
WHERE trg.active = 1
|
||||
GROUP BY carrier.id_tax_rules_group
|
||||
GROUP BY c.id_tax_rules_group
|
||||
ORDER BY n DESC
|
||||
LIMIT 1
|
||||
) most_used'
|
||||
|
||||
@@ -472,9 +472,11 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
|
||||
public function getStepThreeFieldsValues($carrier)
|
||||
{
|
||||
$id_tax_rules_group = (is_object($this->object) && !$this->object->id) ? Carrier::getIdTaxRulesGroupMostUsed() : $this->getFieldValue($carrier, 'id_tax_rules_group');
|
||||
|
||||
return array(
|
||||
'is_free' => $this->getFieldValue($carrier, 'is_free'),
|
||||
'id_tax_rules_group' => $this->getFieldValue($carrier, 'id_tax_rules_group'),
|
||||
'id_tax_rules_group' => (int)$id_tax_rules_group,
|
||||
'shipping_handling' => $this->getFieldValue($carrier, 'shipping_handling'),
|
||||
'shipping_method' => $this->getFieldValue($carrier, 'shipping_method'),
|
||||
'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'),
|
||||
|
||||
Reference in New Issue
Block a user