interchange / interchange6-schema

DBIC schema for Interchange 6
8 stars 7 forks source link

default billing and shipping address #175

Closed hexfusion closed 9 years ago

hexfusion commented 9 years ago

A user can have many addresses but from what I can tell we can not define a default for shipping or billing. One way this could be accomplished is to add a billing_address_id and shipping_address_id to User. Then we can have an address book of addresses but the defaults are directly set in User. This allows us to populate user forms with defined defaults.

SysPete commented 9 years ago

Not keen on adding columns to User for this. I think I'd prefer priority column in Address. You could set priority to 10000 for default address and then increment priority by 1 each time an address is used so you present address options in a sensible order.

racke commented 9 years ago

Yeah priority makes sense to me as well. I would use 1 for default address and 0 otherwise. That's good enough for the regular shop, but allow flexibility for special shops / customers.

hexfusion commented 9 years ago

:+1: thanks