From 6a17efdb736f905f973b7a774f07d794ce32f28b Mon Sep 17 00:00:00 2001 From: Nick Dijkstra Date: Thu, 7 Feb 2019 10:53:38 +0100 Subject: [PATCH 1/3] Update readme.md --- readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/readme.md b/readme.md index e315e1df..61062229 100755 --- a/readme.md +++ b/readme.md @@ -30,7 +30,6 @@ them ready-made into your OpenCart webshop with this powerful plugin. - PayPal - SEPA Direct Debits - SEPA Bank Transfer -- Bitcoin - iDeal - Bancontact - Paysafecard From b3002e69e8f6a571ce7f4ea02f17370f7abd8a6f Mon Sep 17 00:00:00 2001 From: Nick Dijkstra Date: Thu, 7 Feb 2019 10:53:51 +0100 Subject: [PATCH 2/3] Update readme.md --- readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/readme.md b/readme.md index 61062229..d9c4b31e 100755 --- a/readme.md +++ b/readme.md @@ -70,7 +70,6 @@ Contact Mollie: [www.mollie.com/nl/about](https://www.mollie.com/nl/about) — i + [More info on SOFORT Banking via Mollie](https://www.mollie.com/payments/sofort/) + [More info on SEPA Bank transfer via Mollie](https://www.mollie.com/payments/banktransfer/) + [More info on SEPA Direct debit via Mollie](https://www.mollie.com/payments/directdebit/) -+ [More info on Bitcoin via Mollie](https://www.mollie.com/payments/bitcoin/) + [More info on PayPal via Mollie](https://www.mollie.com/payments/paypal/) + [More info on Belfius Direct Net via Mollie](https://www.mollie.com/payments/belfiusdirectnet/) + [More info on paysafecard via Mollie](https://www.mollie.com/payments/paysafecard/) From c6d3d2f7d9121386c770ad4dc03e3dbef1b17fd8 Mon Sep 17 00:00:00 2001 From: Maxim Janssens Date: Fri, 8 Feb 2019 17:07:13 +0100 Subject: [PATCH 3/3] COMDEVNL-1814 -- Fix OCMod support to support 1.5 --- composer.json | 2 +- system/comercia/load.php | 58 ++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index 9ed479ee..2e8a5cc6 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "license": "BSD-2-Clause", "require": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-curl": "*", "ext-openssl": "*" }, diff --git a/system/comercia/load.php b/system/comercia/load.php index 41c0fd97..3fca0f99 100644 --- a/system/comercia/load.php +++ b/system/comercia/load.php @@ -22,9 +22,9 @@ function library($library) $bestOption = $this->findBestOption($libDir, $library, "php"); if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($libDir . $bestOption["name"] . ".php"), $libDir . $bestOption["name"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($libDir . $bestOption["name"] . ".php"), $libDir . $bestOption["name"] . ".php")); } else { - @include_once(modification($libDir . $bestOption["name"] . ".php")); + @include_once($this->modification($libDir . $bestOption["name"] . ".php")); } } @@ -108,9 +108,9 @@ function model($model) $className = $route["class"]; if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($modelDir . $route["file"] . ".php"), $modelDir . $route["file"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($modelDir . $route["file"] . ".php"), $modelDir . $route["file"] . ".php")); } else { - @include_once(modification($modelDir . $route["file"] . ".php")); + @include_once($this->modification($modelDir . $route["file"] . ".php")); } } @@ -119,8 +119,8 @@ function model($model) //Check for events if(Util::version()->isMinimal("2.2")) { $result = new \Proxy(); - - $r = new \ReflectionMethod('Loader', 'callback'); + + $r = new \ReflectionMethod('Loader', 'callback'); $r->setAccessible(true); foreach (get_class_methods($className) as $method) { @@ -129,7 +129,7 @@ function model($model) } else { $result = new $className(Util::registry()); } - + Util::registry()->set(Util::stringHelper()->ccToUnderline($className), $result); return $result; } @@ -234,9 +234,9 @@ function view($view, $data = array()) } $fakeControllerFile = __DIR__ . "/fakeController.php"; if (class_exists("VQMod")) { - require_once(\VQMod::modCheck(modification($fakeControllerFile), $fakeControllerFile)); + require_once(\VQMod::modCheck($this->modification($fakeControllerFile), $fakeControllerFile)); } else { - require_once(modification($fakeControllerFile)); + require_once($this->modification($fakeControllerFile)); } $controller = new FakeController($registry); $result = $controller->getView($view, $data); @@ -326,9 +326,9 @@ function controller($controller) $className = $route["class"]; if (!class_exists($className)) { if (class_exists("VQMod")) { - @include_once(\VQMod::modCheck(modification($controllerDir . $route["file"] . ".php"), $controllerDir . $route["file"] . ".php")); + @include_once(\VQMod::modCheck($this->modification($controllerDir . $route["file"] . ".php"), $controllerDir . $route["file"] . ".php")); } else { - @include_once(modification($controllerDir . $route["file"] . ".php")); + @include_once($this->modification($controllerDir . $route["file"] . ".php")); } } @@ -368,12 +368,16 @@ private function rewriteModel($model) "" => "sale/custom_field", "2.1" => "customer/custom_field" ], + [ + "" => "sale/customer_group", + "2.1" => "customer/customer_group" + ], [ "" => "setting/extension", "2.0" => "extension/extension", "3.0" => "setting/extension" ], - [ + [ "" => "extension/event", "3.0" => "setting/event" ] @@ -393,23 +397,25 @@ private function rewriteLanguage($model) ] ); } - - // Modification Override + + // Modification Override function modification($filename) { - if (defined('DIR_CATALOG')) { - $file = DIR_MODIFICATION . 'admin/' . substr($filename, strlen(DIR_APPLICATION)); - } elseif (defined('DIR_OPENCART')) { - $file = DIR_MODIFICATION . 'install/' . substr($filename, strlen(DIR_APPLICATION)); - } else { - $file = DIR_MODIFICATION . 'catalog/' . substr($filename, strlen(DIR_APPLICATION)); - } + if (Util::version()->isMinimal(2.0)) { + if (defined('DIR_CATALOG')) { + $file = DIR_MODIFICATION . 'admin/' . substr($filename, strlen(DIR_APPLICATION)); + } elseif (defined('DIR_OPENCART')) { + $file = DIR_MODIFICATION . 'install/' . substr($filename, strlen(DIR_APPLICATION)); + } else { + $file = DIR_MODIFICATION . 'catalog/' . substr($filename, strlen(DIR_APPLICATION)); + } - if (substr($filename, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { - $file = DIR_MODIFICATION . 'system/' . substr($filename, strlen(DIR_SYSTEM)); - } + if (substr($filename, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { + $file = DIR_MODIFICATION . 'system/' . substr($filename, strlen(DIR_SYSTEM)); + } - if (is_file($file)) { - return $file; + if (is_file($file)) { + return $file; + } } return $filename;