Projekt

Allgemein

Profil

GX-Bug #46425 » CSVPersonalOffersFix1.patch

/system/classes/csv/CSVSource.php - Till Tepelmann, 27.05.2016 18:41

Unterschiede anzeigen:

src/system/classes/csv/CSVSource.php (revision )
2767 2767
		{
2768 2768
			return;
2769 2769
		}
2770
		$t_action = 'replace';
2771 2770

  
2772 2771
		foreach ($t_tables as $t_table_name)
2773 2772
		{
......
2782 2781
				$t_table_data[$t_quantity]['products_id'] = $p_import_data['products']['products_id'];
2783 2782
				$t_table_data[$t_quantity]['quantity'] = $t_quantity;
2784 2783
				$t_where = 'products_id = ' . $t_table_data[$t_quantity]['products_id'] . ' AND quantity = ' . $t_quantity;
2784
				$check = xtc_db_query('SELECT price_id FROM '.$t_table_name.' WHERE '.$t_where);
2785

  
2786
				if(xtc_db_num_rows($check) > 0)
2787
				{
2788
					$t_action = 'update';
2789
				}
2790
				else
2791
				{
2792
					$t_action = 'insert';
2793
				}
2785 2794
				xtc_db_perform($t_table_name, $t_table_data[$t_quantity], $t_action, $t_where);
2786 2795
			}
2787 2796
		}
    (1-1/1)