Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($fields as $key => $row)
- {
- $tmp = 0;
- if ((int)$row['id_customer'] AND $row['id_customer'] != $customer->id AND $row['email'] != $from)
- continue;
- if ($row['id_order'] != 0 AND Tools::getValue('id_order') != $row['id_order'])
- continue;
- if ($row['email'] == $from)
- $tmp += 4;
- if ($row['id_contact'] == $id_contact)
- $tmp++;
- if (Tools::getValue('id_product') != 0 AND $row['id_product'] == Tools::getValue('id_product'))
- $tmp += 2;
- if ($tmp >= 5 AND $tmp >= $score)
- {
- $score = $tmp;
- $id_customer_thread = $row['id_customer_thread'];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement