Skip to content

Commit

Permalink
11.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
QualityWorks committed Aug 25, 2022
1 parent 2e054fe commit 98c9487
Show file tree
Hide file tree
Showing 47 changed files with 1,221 additions and 495 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

# Changelog #

#### Changes in release 11.2.0
+ Added IN3 Payment Method
+ Fixed issue related to currencies decimal places
+ Bugfix address validation of zone and postcode
+ Removed order total notice when Mollie Payment Fee isn't enabled
+ Changed PHP version check in update function

#### Changes in release 11.1.1
+ Fixed bug related to shipping details

#### Changes in release 11.1.0
+ Updated mollie payment details interface on order page
+ Removed mollie payment fee options from 'payment' module and added them to 'order total' module (Mollie Payment Fee)
Expand Down
4 changes: 4 additions & 0 deletions admin/controller/extension/payment/mollie_in3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
include_once(DIR_APPLICATION . "controller/payment/mollie_in3.php");
class ControllerExtensionPaymentMollieIN3 extends ControllerPaymentMollieIN3{}
?>
74 changes: 55 additions & 19 deletions admin/controller/payment/mollie/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,23 @@ public function install () {
}
}
}

// Add voucher category field
if(!$this->db->query("SHOW COLUMNS FROM `" . DB_PREFIX . "product` LIKE 'voucher_category'")->row) {
$this->db->query("ALTER TABLE `" . DB_PREFIX . "product` ADD `voucher_category` VARCHAR(20) NULL");
}

// Fix for empty transaction id in old versions
$query = $this->db->query("SELECT * FROM `" .DB_PREFIX. "mollie_payments`");
if ($query->num_rows) {
foreach ($query->rows as $row) {
if (!$row['transaction_id']) {
$rand_string = substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil(10/strlen($x)) )), 1, 10);

$this->db->query("UPDATE `" .DB_PREFIX. "mollie_payments` SET transaction_id = '" . $rand_string . "' WHERE order_id = '" . $row['order_id'] . "' AND mollie_order_id = '" . $row['mollie_order_id'] . "'");
}
}
}
}

public function enableModFile($keep = '') {
Expand Down Expand Up @@ -507,6 +524,29 @@ public function cleanUp() {
unlink(DIR_SYSTEM.'../vqmod/mods.cache');
}
}

// Remove installer files (if exist)
$languageFiles = glob($adminLanguageDir .'*/extension/payment/_mollie.php');
foreach($languageFiles as $file) {
if(file_exists($file)) {
unlink($file);
}
}

$languageFiles = glob($adminLanguageDir .'*/payment/_mollie.php');
foreach($languageFiles as $file) {
if(file_exists($file)) {
unlink($file);
}
}

if(file_exists($adminControllerDir . 'extension/payment/_mollie.php')) {
unlink($adminControllerDir . 'extension/payment/_mollie.php');
}

if(file_exists($adminControllerDir . 'payment/_mollie.php')) {
unlink($adminControllerDir . 'payment/_mollie.php');
}
}

public function delTree($dir) {
Expand Down Expand Up @@ -953,6 +993,7 @@ public function index () {
$data['name_mollie_klarnasliceit'] = $this->language->get('name_mollie_klarnasliceit');
$data['name_mollie_przelewy24'] = $this->language->get('name_mollie_przelewy24');
$data['name_mollie_applepay'] = $this->language->get('name_mollie_applepay');
$data['name_mollie_in3'] = $this->language->get('name_mollie_in3');
// Deprecated names
$data['name_mollie_bitcoin'] = $this->language->get('name_mollie_bitcoin');
$data['name_mollie_mistercash'] = $this->language->get('name_mollie_mistercash');
Expand Down Expand Up @@ -1057,11 +1098,19 @@ public function index () {

$data['update_url'] = ($this->getUpdateUrl()) ? $this->getUpdateUrl()['updateUrl'] : '';
if (version_compare(phpversion(), MollieHelper::MIN_PHP_VERSION, "<")) {
$data['text_update'] = ($this->getUpdateUrl()) ? sprintf($this->language->get('text_update_message_warning'), $this->getUpdateUrl()['updateVersion'], $this->getUpdateUrl()['updateVersion']) : '';
$data['module_update'] = false;
$data['error_min_php_version'] = sprintf($this->language->get('error_min_php_version'), MollieHelper::MIN_PHP_VERSION);
} else {
$data['text_update'] = ($this->getUpdateUrl()) ? sprintf($this->language->get('text_update_message'), $this->getUpdateUrl()['updateVersion'], $data['update_url'], $this->getUpdateUrl()['updateVersion']) : '';
$data['module_update'] = true;
$data['error_min_php_version'] = '';
}

if ($this->getUpdateUrl()) {
if (version_compare(phpversion(), MollieHelper::NEXT_PHP_VERSION, "<")) {
$data['text_update'] = sprintf($this->language->get('text_update_message_warning'), $this->getUpdateUrl()['updateVersion'], MollieHelper::NEXT_PHP_VERSION, $this->getUpdateUrl()['updateVersion']);
$data['module_update'] = false;
} else {
$data['text_update'] = sprintf($this->language->get('text_update_message'), $this->getUpdateUrl()['updateVersion'], $data['update_url'], $this->getUpdateUrl()['updateVersion']);
$data['module_update'] = true;
}
}

if (isset($_COOKIE["hide_mollie_update_message_version"]) && ($_COOKIE["hide_mollie_update_message_version"] == $this->getUpdateUrl()['updateVersion'])) {
Expand All @@ -1082,12 +1131,6 @@ public function index () {
$data['currencies'] = $this->model_localisation_currency->getCurrencies();
$data['tax_classes'] = $this->model_localisation_tax_class->getTaxClasses();

// Check if Mollie Payment Fee order total is enabled
$molliePaymentFee = $this->config->get('total_mollie_payment_fee_status') || $this->config->get('mollie_payment_fee_status');
if (!$molliePaymentFee) {
$this->session->data['warning_payment_fee'] = $this->language->get('error_mollie_payment_fee');
}

$this->load->model('tool/image');

if(version_compare(VERSION, '2.0.2.0', '>=')) {
Expand All @@ -1112,13 +1155,6 @@ public function index () {
$data['warning'] = '';
}

if(isset($this->session->data['warning_payment_fee'])) {
$data['warning_payment_fee'] = $this->session->data['warning_payment_fee'];
$this->session->data['warning_payment_fee'] = '';
} else {
$data['warning_payment_fee'] = '';
}

if(isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
Expand Down Expand Up @@ -1537,8 +1573,8 @@ private function getUpdateUrl() {

function update() {

// CHeck for PHP version
if (version_compare(phpversion(), MollieHelper::MIN_PHP_VERSION, "<")) {
// Check for PHP version
if (version_compare(phpversion(), MollieHelper::NEXT_PHP_VERSION, "<")) {
if (version_compare(VERSION, '2.3', '>=')) {
$this->response->redirect($this->url->link('extension/payment/mollie_' . static::MODULE_NAME, $this->token, true));
} elseif (version_compare(VERSION, '2', '>=')) {
Expand Down
7 changes: 7 additions & 0 deletions admin/controller/payment/mollie_in3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
require_once(DIR_APPLICATION . "controller/payment/mollie/base.php");

class ControllerPaymentMollieIN3 extends ControllerPaymentMollieBase
{
const MODULE_NAME = MollieHelper::MODULE_NAME_IN3;
}
2 changes: 2 additions & 0 deletions admin/language/de-de/extension/payment/mollie_in3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_in3.php");
4 changes: 4 additions & 0 deletions admin/language/de-de/payment/mollie_in3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require(dirname(__FILE__) . "/mollie.php");

$_['heading_title'] .= " &ndash; " . $_['name_mollie_in3'];
2 changes: 2 additions & 0 deletions admin/language/dutch/extension/payment/mollie_in3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
include(__DIR__."/../../payment/mollie_in3.php");
Loading

0 comments on commit 98c9487

Please sign in to comment.