Details
Description
We need to preserve the original information of the Address object, which ties into new Tax framework. For this we need to save a full copy of the address object with the CustomerOrder rather than just a formatted line.
TD:
1. Rework order address formatter so that it uses shop attribute: SHOP_ADDRESS_FORMATTER. parameters to template should be (same as in current bean config):
0 - address line 1
1 - address line 2
2 - post(zip) code
3 - city
4 - country code
5 - county/state/province/area code
6 - first name
7 - last name
8 - contact phone(s) as string
2. Remove non-null constraint from Address to allow customer independent addresses
3. Add getBillingAddressDetails() and getShippingAddressDetails() to CustomerOrder to link to Address object copies. Make sure that there is cascade delete in hibernate setting so that when the order is deleted the addresses are deleted too
4. In OrderAssembler create a copy of the billing/shipping address (without setting customer) and assign it to the properties of CustomerOrder