An improvement has been implemented that allows to request a client's mobile phone number when placing an order, if his account does not have a mobile, but this field is mandatory at least in one of the registration forms and the site uses SMS notifications.
Take a look at the option "Basket: Request a mobile client when placing an order, if it is mandatory in any registration form". Variants of values - "No", "Yes" and "Yes, only for clients with login through social network".
The difference between "Yes" and "Yes, only for clients with login through social network" is in the partition of use cases. "Yes" is for filling mobile phone numbers in general, if earlier it was optional, and now it has become obligatory. "Yes, only for clients with login through social network" is for collaboration with login through social networks to alert potential duplicating of clients accounts, because social networks do not provide mobile phone numbers.
How it works?
SMS notification is enable on the site, at least in one of the registration forms the mobile is obligatory and the option above in the meaning of "Yes" or "Yes, ...".
At the stage of placing the order, system asks to enter the mobile if it is not available in current clients' account. A confirmation code is sent to the client in the SMS. After confirming the mobile, we are looking for matches by mobile phone number among the customers of the site.
I. If there are no matches on the mobile, then the mobile is set in the current account, order checkout as usual.
II. When there is a match, the following information in the found accounts is checked:
- email,
- mobile phone number,
- orders,
- clients cars,
- vin-queries,
- balances.
Based on these data, further developments:
1. If there are no orders, vin-queries, clients cars and balances = 0 in the current account,
then system logs in the client in his previous account, forwards cart items, saves email, links social network account to the previous account. New account, where mobile number was missed, is deleted, add "_deleted" to the email. Show message "moveToOldAccountInfo" and send email "moveToOldAccountEmail" with subject "moveAccountEmailSubject" "Account merging".
2. If there are no orders, vin-queries, clients cars and balances = 0 in the previous account,
then system replaces mobile from the previous to current account, deletes the previous account, links social network accounts to the current account. Show message "moveToNewAccountInfo" and send email "moveToNewAccountEmail" with subject "moveAccountEmailSubject" "Account merging".
When merging accounts all items that were in the baskets of both accounts are selected for an order. So we remind that the customer wanted to order something in the previous account, but did not do that. The customer can return to the basket and select the desired items for the order if the option "Basket: allow partial ordering" = "Yes".
3. If both accounts has important information, then the system logs in the client into account with mobile, forwards cart items and shows message "twoAccountsInfo" that says the customer has several account and asks to contact manager to merge account manually.