mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-21 20:56:07 +03:00
parent
5e695863a3
commit
dc2bee57d4
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
|||||||
/www
|
/www
|
||||||
/bin
|
/bin
|
||||||
.env
|
.env
|
||||||
|
composer.lock
|
@ -136,6 +136,7 @@ class ModelExtensionRetailcrmIcml extends Model
|
|||||||
|
|
||||||
if ($optionString != '0:0-0') {
|
if ($optionString != '0:0-0') {
|
||||||
$optionData = $this->getOptionData($optionIds[1], $option[1]);
|
$optionData = $this->getOptionData($optionIds[1], $option[1]);
|
||||||
|
if (!empty($optionData)) {
|
||||||
$options[$optionIds[0]] = array(
|
$options[$optionIds[0]] = array(
|
||||||
'name' => $optionData['optionName'],
|
'name' => $optionData['optionName'],
|
||||||
'value' => $optionData['optionValue'],
|
'value' => $optionData['optionValue'],
|
||||||
@ -143,6 +144,7 @@ class ModelExtensionRetailcrmIcml extends Model
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ksort($options);
|
ksort($options);
|
||||||
|
|
||||||
@ -247,7 +249,7 @@ class ModelExtensionRetailcrmIcml extends Model
|
|||||||
$productHeight = $product['height'];
|
$productHeight = $product['height'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($defaultLenght['length_class_id'] != $settingLenght) {
|
if ($defaultLenght['length_class_id'] != $settingLenght && $settingLenght) {
|
||||||
$unit = $this->model_localisation_length_class->getLengthClass($settingLenght);
|
$unit = $this->model_localisation_length_class->getLengthClass($settingLenght);
|
||||||
$productLength = $productLength * $unit['value'];
|
$productLength = $productLength * $unit['value'];
|
||||||
$productWidth = $productWidth * $unit['value'];
|
$productWidth = $productWidth * $unit['value'];
|
||||||
@ -311,7 +313,7 @@ class ModelExtensionRetailcrmIcml extends Model
|
|||||||
$weight = $this->dd->createElement('param');
|
$weight = $this->dd->createElement('param');
|
||||||
$weight->setAttribute('code', 'weight');
|
$weight->setAttribute('code', 'weight');
|
||||||
$weight->setAttribute('name', $this->language->get('weight'));
|
$weight->setAttribute('name', $this->language->get('weight'));
|
||||||
$weightValue = (isset($offer['weight_class']))
|
$weightValue = (isset($product['weight_class']))
|
||||||
? round($product['weight'], 3) . ' ' . $product['weight_class']
|
? round($product['weight'], 3) . ' ' . $product['weight_class']
|
||||||
: round($product['weight'], 3)
|
: round($product['weight'], 3)
|
||||||
;
|
;
|
||||||
@ -356,11 +358,13 @@ class ModelExtensionRetailcrmIcml extends Model
|
|||||||
$this->optionValues[$optionValueId] = $optionValue;
|
$this->optionValues[$optionValueId] = $optionValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($option['name']) || !empty($optionValue['name'])) {
|
||||||
return array(
|
return array(
|
||||||
'optionName' => $option['name'],
|
'optionName' => $option['name'],
|
||||||
'optionValue' => $optionValue['name']
|
'optionValue' => $optionValue['name']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function getDefaultCurrency() {
|
private function getDefaultCurrency() {
|
||||||
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency");
|
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency");
|
||||||
|
Loading…
Reference in New Issue
Block a user