#

Разница между версиями OpenCart для разработки модулей

10.11.2022By 0 Comments

Шпаргалка для создания модулей под разные версии OpenCart. Предполагается, что создание (изменение существующего) произошло на OpenCart 3. А затем создаются варианты под более ранние версии системы.

3 >> 2.3

module_
->
Заменить на пустоту

2.3 >> 2.1-2.2

ControllerExtensionModule
->
ControllerModule


ModelExtensionModule
->
ModelModule

extension/module/
->
module/

$this->model_extension_module
->
$this->model_module

if ($res) {
$res = $this->currency->format($this->tax->calculate($res, $tax_class_id, $this->config->get(‘config_tax’)), $this->session->data[‘currency’]);
}

->->->

if ($res) {
if (version_compare(VERSION, ‘2.2’) >= 0) {
$res = $this->currency->format($this->tax->calculate($res, $tax_class_id, $this->config->get(‘config_tax’)), $this-

>session->data[‘currency’]);
} else {
$res = $this->currency->format($this->tax->calculate($res, $tax_class_id, $this->config->get(‘config_tax’)));
}
}

About the Author

Would you like to share your thoughts?

Your email address will not be published. Required fields are marked *