Merge remote-tracking branch 'origin/ticket-14525-parrain' into develop
This commit is contained in:
commit
c2c55f1302
@ -27,8 +27,8 @@ if ($id_customer !== 0 && Tools::getValue('adtoken') === Tools::encrypt('InviteA
|
||||
// Search customer by email
|
||||
elseif (Tools::getvalue('action') == 'search') {
|
||||
$q = Tools::getValue('term');
|
||||
$sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, `email`) AS value
|
||||
FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.$q.'%"';
|
||||
$sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, CONCAT("(", `email`, ")")) AS value
|
||||
FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.pSQL($q).'%"';
|
||||
$result = Db::getInstance()->executeS($sql);
|
||||
echo Tools::jsonEncode($result);
|
||||
exit;
|
||||
|
@ -1303,11 +1303,11 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
0
|
||||
)');
|
||||
}
|
||||
// Replace
|
||||
else {
|
||||
// Replace - Do nothing
|
||||
/*else {
|
||||
$result = Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'invite` SET `id_sponsor`='.$id_sponsor.
|
||||
' WHERE `id_customer`='.$customer->id);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (count($orders) == 1 && $result) {
|
||||
$sponsorCustomer = new Customer($id_sponsor);
|
||||
|
Loading…
Reference in New Issue
Block a user