Jump to content

Assign customers with a default custom address


tivicrdotcom

Recommended Posts

Hello fellow Geeks, so customers can add a shipping address so receive their products, this is nothing new so the catch is a as follow. Besides selling products, we give customers the option to buy other stuff not found on our store, let's say Amazon or eBay and ship it to our warehouse in Miami and from there we will forward to their country and deliver.

The system doesn't have to generate random addresses since it will always be the same address but what changes is the name on it. I was thinking adding the button "Apply for a free US address" so when they click, it generates this address and diplays on his account for future reference.

 

Any suggestions on whats is the best mode to approach this? Whats steps to follow? Thanks in advance!

regards,
AJ

 

Edited by tivicrdotcom (see edit history)
Link to comment
Share on other sites

I would suggest this solutions - instead of generate new (but same) address for every customer, let's create only one address and share it with all customers that applied for this forwarding functionality. This will let you change the address later, and the changes will be immediately reflected in your customers account (since they all share the same address)

 

So, you would have to change:

 

1) extend customer table - add new boolean field 'free_address' 

2) modify few SQLs that handle addresses retrieval - extend condition to include this public address, but only when customer field free_address == true

3) modify controller to prevent editing this public address

4) create button "Apply for a free US address" that will set 'free address' to true

 

Shouldn't be hard. 

Link to comment
Share on other sites

Guys you are the best, I really appreciate it. The reason why would I want them all to have the same address in the US is because customers are overseas so when they do their own shopping, they sort of "apply for a free" US address. It could say something like: Would you like to have your US address in the US to ship your orders? Get yours here [click the button] and all it does is to display his Name (taken from the name_field) followed by the address in different rows.

This way they ship the orders to me and I will re-route them to their final destination.

Cheers,
AJ

Link to comment
Share on other sites

I would suggest this solutions - instead of generate new (but same) address for every customer, let's create only one address and share it with all customers that applied for this forwarding functionality. This will let you change the address later, and the changes will be immediately reflected in your customers account (since they all share the same address)

 

So, you would have to change:

 

1) extend customer table - add new boolean field 'free_address' 

2) modify few SQLs that handle addresses retrieval - extend condition to include this public address, but only when customer field free_address == true

3) modify controller to prevent editing this public address

4) create button "Apply for a free US address" that will set 'free address' to true

 

Shouldn't be hard. 

 

Thank you DataKick, I would definitely try it at my test site because I see myself screwing something up along the learning process haha

 

Cheers,

AJ

Link to comment
Share on other sites

  • 3 years later...
On 5/30/2017 at 11:43 AM, DataKick said:

I would suggest this solutions - instead of generate new (but same) address for every customer, let's create only one address and share it with all customers that applied for this forwarding functionality. This will let you change the address later, and the changes will be immediately reflected in your customers account (since they all share the same address)

 

So, you would have to change:

 

1) extend customer table - add new boolean field 'free_address' 

2) modify few SQLs that handle addresses retrieval - extend condition to include this public address, but only when customer field free_address == true

3) modify controller to prevent editing this public address

4) create button "Apply for a free US address" that will set 'free address' to true

 

Shouldn't be hard. 

Hi, I have kind of the same problem and I really think that your solution can be useful. The thing is that I am kind of a beginner with prestashop and I don't quite know how to do the things that you propose. Could you explain the 4 steps with a little bit more detail? It would be very useful to me.

Thank you very much

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...