Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions upload/admin/controller/module/postnl_adrescheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class ControllerModulePostnlAdrescheck extends Controller {

public function index() {

$data = $this->load->language('extension/module/postnl_adrescheck');
if(version_compare(VERSION, '2.2.0.0') > 0) {
$data = $this->load->language('extension/module/postnl_adrescheck');
} else {
$data = $this->load->language('module/postnl_adrescheck');
}

$links = [
'%link_products%' => 'https://www.postnl.nl/zakelijke-oplossingen/slimme-dataoplossingen/adrescheck/',
Expand Down Expand Up @@ -107,7 +111,7 @@ public function index() {
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');

if(version_compare(VERSION, '2.2.0.0') >= 0) {
if(version_compare(VERSION, '2.2.0.0') > 0) {
$this->response->setOutput($this->load->view('extension/module/postnl_adrescheck', $data));
}
else {
Expand All @@ -130,7 +134,7 @@ public function install() {
$this->load->model('extension/event');
$mdl = $this->model_extension_event;
}
if(version_compare(VERSION, '2.2.0.0') >= 0) {
if(version_compare(VERSION, '2.2.0.0') > 0) {
$mdl->deleteEvent('postnl_adrescheck');
$mdl->addEvent('postnl_adrescheck', 'admin/view/common/dashboard/after', 'extension/module/postnl_adrescheck/eventDashboardAfter');
$mdl->addEvent('postnl_adrescheck', 'catalog/view/common/header/before', 'extension/module/postnl_adrescheck/eventHeaderBefore');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/ ?>
<?php if($module_postnl_adrescheck_status == 1) { ?>
<?php if(isset($module_postnl_adrescheck_status) && $module_postnl_adrescheck_status == 1) { ?>
<script type="text/javascript">
var postnl_adrescheck_data = JSON.parse('<?php echo $module_postnl_adrescheck_json ?>');
(function() {
Expand All @@ -27,4 +27,4 @@ var postnl_adrescheck_data = JSON.parse('<?php echo $module_postnl_adrescheck_js
postnl_loadScript("catalog/view/javascript/postnl_adrescheck/postnl_adrescheck.js");
})();
</script>
<?php }
<?php }