Projekt

Allgemein

Profil

GX-Bug #55463 » CODFix.patch

Till Tepelmann, 11.04.2018 17:40

Unterschiede anzeigen:

src/includes/modules/payment/cod.php (date 1523460970000)
44 44
	function update_status() {
45 45
		global $order;
46 46
		
47
		$disabledShippings = str_replace(' ', '', MODULE_PAYMENT_COD_DISABLED_SHIPPINGS);
48
		$disabledShippings = explode(',', $disabledShippings);
49
		$shippingModule    = explode('_', $_SESSION['shipping']['id'])[0];
50
		
51
		if(isset($shippingModule) && in_array($shippingModule, $disabledShippings))
52
		{
53
			$this->enabled = false;
47
		if(defined('MODULE_PAYMENT_COD_DISABLED_SHIPPINGS'))
48
		{
49
			$disabledShippings = str_replace(' ', '', MODULE_PAYMENT_COD_DISABLED_SHIPPINGS);
50
			$disabledShippings = explode(',', $disabledShippings);
51
			$shippingModule    = explode('_', $_SESSION['shipping']['id'])[0];
52
			
53
			if(isset($shippingModule) && in_array($shippingModule, $disabledShippings))
54
			{
55
				$this->enabled = false;
56
			}
54 57
		}
55
		
56 58
		if ($_SESSION['shipping']['id'] == 'selfpickup_selfpickup') {
57 59
			$this->enabled = false;
58 60
		}
......
101 103
			return false;
102 104
		}
103 105

  
104
		if (MODULE_ORDER_TOTAL_COD_FEE_STATUS == 'true') {
106
		if (defined('MODULE_ORDER_TOTAL_COD_FEE_STATUS') && MODULE_ORDER_TOTAL_COD_FEE_STATUS == 'true') {
105 107

  
106 108

  
107 109
			$cod_country = false;
src/gambio_updater/updates/v3.9.2.1/dependent.inc.php (date 1523461037000)
1
<?php
2
/* --------------------------------------------------------------
3
   dependent.inc.php 2018-04-11
4
   Gambio GmbH
5
   http://www.gambio.de
6
   Copyright (c) 2018 Gambio GmbH
7
   Released under the GNU General Public License (Version 2)
8
   [http://www.gnu.org/licenses/gpl-2.0.html]
9
   --------------------------------------------------------------
10
*/
11

  
12
$check = $this->query('SELECT * FROM `configuration` WHERE `configuration_key` = "MODULE_PAYMENT_INSTALLED" AND configuration_value LIKE "%cod.php%"', true);
13
if($check->num_rows == 1)
14
{
15
	// Add new disable shipping modules setting for cod
16
	$check = $this->query('SELECT * FROM `configuration` WHERE `configuration_key` = "MODULE_PAYMENT_COD_DISABLED_SHIPPINGS"', true);
17
	if($check->num_rows == 0)
18
	{
19
		$query = "insert into `configuration` ( configuration_key, configuration_value,  configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_COD_DISABLED_SHIPPINGS', '','6', '0', now())";
20
		$this->query($query, true);
21
	}
22
}
    (1-1/1)