Skip to content

Commit

Permalink
Merge branch 'hotfix/2.6.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jan 20, 2020
2 parents 2abf913 + f54eefa commit ed96679
Show file tree
Hide file tree
Showing 22 changed files with 127 additions and 50 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"contao-community-alliance/composer-plugin": "~2.4 || ~3.0",
"terminal42/contao-conditionalselectmenu":"^3.0.3",
"terminal42/dcawizard": "~2.3",
"codefog/contao-haste": "~4.15",
"codefog/contao-haste": "^4.24.3",
"menatwork/contao-multicolumnwizard": "~3.2",
"terminal42/contao-tablelookupwizard": "~3.2",
"terminal42/notification_center": "~1.0",
Expand Down
20 changes: 15 additions & 5 deletions system/modules/isotope/docs/CHANGELOG-2.6.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
Isotope eCommerce Changelog
===========================

Version 2.6.5 (2020-01-20)
--------------------------

- Do not update order on postsale if it's already locked
- Fix incorrect surcharge calculation for default price (#2059)
- Fix MariaDB compatibility in product sales report (#2102)
- Pass config array to hooks in product collection (#2062)
- Fixed Contao 4 compatibility problem (#1931)


Version 2.6.4 (2019-11-27)
---------------------------------
--------------------------

- Only enable RTE config in the TextArea attribute
- Escape MySQL 8 keywords (#2088, #2093)
Expand All @@ -14,7 +24,7 @@ Version 2.6.4 (2019-11-27)


Version 2.6.3 (2019-10-15)
---------------------------------
--------------------------

### Fixed

Expand All @@ -23,7 +33,7 @@ Version 2.6.3 (2019-10-15)


Version 2.6.2 (2019-09-17)
---------------------------------
--------------------------

### Fixed

Expand All @@ -35,15 +45,15 @@ Version 2.6.2 (2019-09-17)


Version 2.6.1 (2019-08-28)
---------------------------------
--------------------------

### Fixed

- Product reader page shows articles of product list page (#2060)


Version 2.6.0 (2019-08-27)
---------------------------------
--------------------------

### New

Expand Down
1 change: 1 addition & 0 deletions system/modules/isotope/initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
}
}

header('HTTP/1.0 500 Internal Server Error');
die('Contao initialize.php was not found');
2 changes: 1 addition & 1 deletion system/modules/isotope/library/Isotope/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public function addOptionsPrice($fltPrice, $objSource, $strField, $intTaxClass,
} elseif ('gross_price' === $strField) {
$fltAmount += $objTax->calculateGrossPrice($amount);
} else {
$fltAmount += $objTax->calculatePrice($amount);
$fltAmount += $amount;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/modules/isotope/library/Isotope/Isotope.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Isotope extends \Controller
/**
* Isotope version
*/
const VERSION = '2.6.4';
const VERSION = '2.6.5';

/**
* True if the system has been initialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . \Input::post('refno') . '" failed', __METHOD__, TL_ERROR);

Expand Down
23 changes: 15 additions & 8 deletions system/modules/isotope/library/Isotope/Model/Payment/EPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,24 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($this->validatePayment($objOrder)) {
if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return;
}
if (!$this->validatePayment($objOrder)) {
return;
}

$objOrder->setDatePaid(time());
$objOrder->updateOrderStatus($this->new_order_status);
if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

$objOrder->save();
if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return;
}

$objOrder->setDatePaid(time());
$objOrder->updateOrderStatus($this->new_order_status);

$objOrder->save();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
\System::log('ExperCash: data rejected' . print_r($_POST, true), __METHOD__, TL_GENERAL);
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . \Input::post('refno') . '" failed', __METHOD__, TL_ERROR);

Expand Down
7 changes: 6 additions & 1 deletion system/modules/isotope/library/Isotope/Model/Payment/PSP.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return false;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return true;
}

if (!$objOrder->checkout()) {
\System::log('Post-Sale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
Checkout::redirectToStep('failed');
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Paybyway checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

switch (\Input::post('RETURN_CODE')) {

case 0: // Payment completed successfully.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
die('TSOK');
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . \Input::post('reference') . '" already completed', __METHOD__, TL_ERROR);
die('TSOK');
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . \Input::post('reference') . '" failed', __METHOD__, TL_ERROR);
die('TSOK');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('PayPal IPN: checkout for Order ID "' . \Input::post('invoice') . '" already completed', __METHOD__, TL_GENERAL);
return;
}

if (!$objOrder->checkout()) {
\System::log('PayPal IPN: checkout for Order ID "' . \Input::post('invoice') . '" failed', __METHOD__, TL_ERROR);
return;
Expand Down
27 changes: 15 additions & 12 deletions system/modules/isotope/library/Isotope/Model/Payment/QuickPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,24 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($this->validatePayment($objOrder)) {
if ($objOrder->isCheckoutComplete()) {
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return;
}
if (!$this->validatePayment($objOrder)) {
return;
}

$objOrder->setDatePaid(time());
$objOrder->updateOrderStatus($this->new_order_status);
if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

$objOrder->save();
if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
return;
}

$objOrder->setDatePaid(time());
$objOrder->updateOrderStatus($this->new_order_status);

$objOrder->save();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

$arrPayment = deserialize($objOrder->payment_data, true);

if (!$this->saferpay_username) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . \Input::post('user_variable_0') . '" failed', __METHOD__, TL_ERROR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
$this->redirectError($arrData);
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
$this->redirectError($arrData);
Expand Down
5 changes: 5 additions & 0 deletions system/modules/isotope/library/Isotope/Model/Payment/VADS.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public function processPostsale(IsotopeProductCollection $objOrder)
return;
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
return;
}

if (!$objOrder->checkout()) {
\System::log('Postsale checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public function processPostSale(IsotopeProductCollection $objOrder)
$this->postsaleError();
}

if ($objOrder->isCheckoutComplete()) {
\System::log('Checkout for Order ID "' . $objOrder->getId() . '" already completed', __METHOD__, TL_ERROR);
$this->postsaleSuccess($objOrder);
}

if ('Y' === \Input::post('transStatus')) {
if (!$objOrder->checkout()) {
\System::log('Checkout for Order ID "' . $objOrder->getId() . '" failed', __METHOD__, TL_ERROR);
Expand Down Expand Up @@ -159,7 +164,7 @@ protected function postsaleError()
<html lang="de">
<head>
<meta charset="utf-8">
<title>The Tulle Factory</title>
<title>Isotope eCommerce</title>
<meta http-equiv="refresh" content="0; url=' . $strUrl . '">
</head>
<body>
Expand All @@ -186,7 +191,7 @@ protected function postsaleSuccess(IsotopeProductCollection $objOrder)
<html lang="de">
<head>
<meta charset="utf-8">
<title>The Tulle Factory</title>
<title>Isotope eCommerce</title>
<meta http-equiv="refresh" content="0; url=' . $strUrl . '">
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ public function addProduct(IsotopeProduct $objProduct, $intQuantity, array $arrC
&& \is_array($GLOBALS['ISO_HOOKS']['addProductToCollection'])
) {
foreach ($GLOBALS['ISO_HOOKS']['addProductToCollection'] as $callback) {
$intQuantity = \System::importStatic($callback[0])->{$callback[1]}($objProduct, $intQuantity, $this);
$intQuantity = \System::importStatic($callback[0])->{$callback[1]}($objProduct, $intQuantity, $this, $arrConfig);
}
}

Expand Down Expand Up @@ -1070,7 +1070,7 @@ public function addProduct(IsotopeProduct $objProduct, $intQuantity, array $arrC
&& \is_array($GLOBALS['ISO_HOOKS']['postAddProductToCollection'])
) {
foreach ($GLOBALS['ISO_HOOKS']['postAddProductToCollection'] as $callback) {
\System::importStatic($callback[0])->{$callback[1]}($objItem, $intQuantity, $this);
\System::importStatic($callback[0])->{$callback[1]}($objItem, $intQuantity, $this, $arrConfig);
}
}

Expand Down Expand Up @@ -1539,7 +1539,7 @@ public function addToTemplate(\Template $objTemplate, array $arrConfig = [])
&& \is_array($GLOBALS['ISO_HOOKS']['addCollectionToTemplate'])
) {
foreach ($GLOBALS['ISO_HOOKS']['addCollectionToTemplate'] as $callback) {
\System::importStatic($callback[0])->{$callback[1]}($objTemplate, $arrItems, $this);
\System::importStatic($callback[0])->{$callback[1]}($objTemplate, $arrItems, $this, $arrConfig);
}
}
}
Expand Down Expand Up @@ -2031,7 +2031,7 @@ private function setProductForItem(IsotopeProduct $product, ProductCollectionIte
$item->price = (float) ($product->getPrice($this) ? $product->getPrice($this)->getAmount((int) $quantity) : 0);
$item->tax_free_price = (float) ($product->getPrice($this) ? $product->getPrice($this)->getNetAmount((int) $quantity) : 0);
}

/**
* Check if product collection has tax
*
Expand All @@ -2044,7 +2044,7 @@ public function hasTax()
return true;
}
}

return false;
}
}
Loading

0 comments on commit ed96679

Please sign in to comment.