cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically assign customer to particular store

Automatically assign customer to particular store

Hello,

 

I've already spent some time researching through various Magento2 extensions. Unfortunately, I couldn't find a solution which suits my case.

 

A little background info:

  • I'm creating the online store which will be an extension for a local store within the UK.
  • Each local store has its own individual stock and inventory.
  • We are going to launch a delivery for our customers

What is the solution am I looking for?

Due to the fact, that each store has its own products and stock, I'm looking for a solution which allows me:

  1. While the user registers an account I need automatically assign him to the exact store which is nearest. Some conditions must be applied to this process.
    • I want to assign the user to the nearest store only if the travel time from a local store location to the customer is no greater than X value (for example 30 minutes).
    • If the customers location doesn't meet the condition above I want to assign him to 'general' store. The 'general store' will not have a delivery option at all. Customer will have only an option to browse products without the option to buy them.
  2. When customer is assigned to exact store I want to show him only the products which this store has in inventory.
  3. Similar to point 2 when a customer makes an order I want to decrease stock levels of the products from the store in which the customer has been allocated

 

I'm looking forward to hear any suggestions how to solve my case.

2 REPLIES 2

Re: Automatically assign customer to particular store

Hello @kamilmorth3b34 

 

A rough idea can be like you can create a new customer attribute for location with dropdown of different location, then you can let user decide for which location he wants to create account (More user friendly as less efforts for you), so user can decide initially level.

When user creates account you can change the functionality based on that place user used in form.

You can change customer account scope to store scope like below :

https://docs.magento.com/user-guide/customers/account-scope.html

and still if you want to use it auto-capture the location then you have to use google maps and capture the distance between store and customer and based on that you can assign store for the user.

 

hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Automatically assign customer to particular store

to use google maps API to calculate it's the ideal way I would like to go for.

 

Unfortunately, I'm not a developer to build it by myself. I'm able to make part of this tool using JS but I'm not qualified enough to develop a legit extension. This is why I'm looking for any extension which will allow me to achieve what I want.

 

If it doesn't exists I'll have to call a developer who will write it for me.