You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: new_files/interface/fs_cleverreach_interface.php
+63-48Lines changed: 63 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,55 @@
62
62
}
63
63
}
64
64
65
+
if (MODULE_FS_CLEVERREACH_INTERFACE_IMPORT_BUYERS == 'true') {
66
+
$where_clause = '';
67
+
if (isset($_GET['export_filter_amazon']) && $_GET['export_filter_amazon'] == 1) {
68
+
$where_clause .= " AND customers_email_address NOT LIKE '%@marketplace.amazon.de%'";
69
+
}
70
+
$order_rows = xtc_db_query("SELECT DISTINCT o.orders_id, o.customers_id, o.customers_email_address as email, o.customers_firstname as firstname, o.customers_lastname as lastname, o.customers_gender as gender, o.customers_street_address as street, o.customers_city as city, o.customers_postcode as zip, o.customers_country as country, o.date_purchased, op.products_id, op.products_name, op.products_price, op.products_quantity from " . TABLE_ORDERS . " o JOIN " . TABLE_ORDERS_PRODUCTS . " op ON o.orders_id = op.orders_id GROUP BY o.customers_id ORDER BY o.date_purchased " . $where_limit . $where_offset);
71
+
while ($order_row = xtc_db_fetch_array($order_rows)) {
$flagged_customers = xtc_db_query("SELECT c.customers_date_added as registered, c.customers_gender as gender, c.customers_dob as dob FROM " . TABLE_CUSTOMERS . " c WHERE c.customers_id = '" . $order_row["customers_id"] . "' AND customers_email_address NOT LIKE '%@marketplace.amazon.de%'");
86
+
87
+
if (xtc_db_num_rows($flagged_customers) > 0) {
88
+
while ($customer = xtc_db_fetch_array($flagged_customers)) {
if (MODULE_FS_CLEVERREACH_INTERFACE_IMPORT_SUBSCRIBERS == 'true') {
66
115
67
116
@@ -113,59 +162,12 @@
113
162
}
114
163
}
115
164
116
-
if (MODULE_FS_CLEVERREACH_INTERFACE_IMPORT_BUYERS == 'true') {
117
-
$where_clause = '';
118
-
if (isset($_GET['export_filter_amazon']) && $_GET['export_filter_amazon'] == 1) {
119
-
$where_clause .= " AND customers_email_address NOT LIKE '%@marketplace.amazon.de%'";
120
-
}
121
-
$order_rows = xtc_db_query("SELECT DISTINCT o.orders_id, o.customers_id, o.customers_email_address as email, o.customers_firstname as firstname, o.customers_lastname as lastname, o.customers_gender as gender, o.customers_street_address as street, o.customers_city as city, o.customers_postcode as zip, o.customers_country as country, o.date_purchased, op.products_id, op.products_name, op.products_price, op.products_quantity from " . TABLE_ORDERS . " o JOIN " . TABLE_ORDERS_PRODUCTS . " op ON o.orders_id = op.orders_id GROUP BY o.customers_id ORDER BY o.date_purchased " . $where_limit . $where_offset);
122
-
while ($order_row = xtc_db_fetch_array($order_rows)) {
$flagged_customers = xtc_db_query("SELECT c.customers_date_added as registered, c.customers_gender as gender, c.customers_dob as dob FROM " . TABLE_CUSTOMERS . " c WHERE c.customers_id = '" . $order_row["customers_id"] . "' AND customers_email_address NOT LIKE '%@marketplace.amazon.de%'");
137
-
138
-
if (xtc_db_num_rows($flagged_customers) > 0) {
139
-
while ($customer = xtc_db_fetch_array($flagged_customers)) {
0 commit comments