Projekt

Allgemein

Profil

GX-Bug #47149 » lagerbestand_nicht_fuer_downloadartikel.patch

Patch - Till Tepelmann, 15.05.2015 12:46

Unterschiede anzeigen:

src/system/classes/checkout/CheckoutControl.inc.php (revision )
121 121

  
122 122
						foreach($gm_attributes as $t_options_id => $t_options_values_id)
123 123
						{
124
							$gm_attribute_stock = xtc_db_query("SELECT products_attributes_id
125
																FROM products_attributes
124
							$gm_attribute_stock = xtc_db_query("SELECT a.products_attributes_id
125
																FROM products_attributes a
126
																LEFT JOIN products_attributes_download AS d ON (a.products_attributes_id = d.products_attributes_id)
126 127
																WHERE
127
																	products_id = '" . (int)$gm_attribute_array[0] . "' AND
128
																	options_id = '" . (int)$t_options_id . "' AND
129
																	options_values_id = '" . (int)$t_options_values_id . "' AND
130
																	(attributes_stock - " . (double)$_SESSION['cart']->contents[$products[$i]['id']]['qty'] . ") < 0");
128
																	a.products_id = '" . (int)$gm_attribute_array[0] . "' AND
129
																	a.options_id = '" . (int)$t_options_id . "' AND
130
																	a.options_values_id = '" . (int)$t_options_values_id . "' AND
131
																	(a.attributes_stock - " . (double)$_SESSION['cart']->contents[$products[$i]['id']]['qty'] . ") < 0 AND
132
																	d.products_attributes_id IS NULL");
131 133
							if(xtc_db_num_rows($gm_attribute_stock) == 1)
132 134
							{
133 135
								$any_out_of_stock = true;
    (1-1/1)