I am building some functionality to have multiple addresses and an address manager.
I am now trying to edit an existing address.
I have been follow the same path as in FastTrack and used BillingAddressFactory.Create OR ShippingAddressFactory.Create to convert my model into a ICustomerAddress for saving.
to save my address but in the method above I can't see where the properties are being updated e.g. FullName was changed and posted, it has the updated info the the parameter (caddress.FullName is correct) but it doesn't update and unless I am missing something I can't see where it's trying to update.
if (!isUpdate)
{
addresses.Add(address);
}
else//update the exiting address
{
//find the address and update the properties??
var addressToUpdate = addresses.Where(x => x.Key == address.Key).FirstOrDefault();
addressToUpdate.FullName = address.FullName;
//and so on
}
This would be modifying Merchello.Core though so I could be completely wrong - any pointers would be great.
Editing Merchello Address
Hi,
I am building some functionality to have multiple addresses and an address manager.
I am now trying to edit an existing address.
I have been follow the same path as in FastTrack and used BillingAddressFactory.Create OR ShippingAddressFactory.Create to convert my model into a ICustomerAddress for saving.
I then call
to save my address but in the method above I can't see where the properties are being updated e.g. FullName was changed and posted, it has the updated info the the parameter (caddress.FullName is correct) but it doesn't update and unless I am missing something I can't see where it's trying to update.
For quick reference https://github.com/Merchello/Merchello/blob/2.1.0/src/Merchello.Core/Models/CustomerExtensions.cs#L351
It works if I change this:
to:
This would be modifying Merchello.Core though so I could be completely wrong - any pointers would be great.
Thanks, Liam
Nope - I don't have any pointer rather would ask you for a pull request for the bug fix =)
is working on a reply...