When using the Edit Addresses button from the Order Details page in AbleCommerce 7.0.5, there is bug when multiple shipments are involved. If you click Save to store any changes made, all the shipment addresses will get set to the address that is shown on the first shipment. This blows away the address details of shipments beyond Shipment #1.

The fix is simple. Edit the /Admin/Orders/EditAddresses.aspx.cs file. Locate the following code:

 

protected void SaveButton_Click(object sender, EventArgs e)

{

    _Order.BillToFirstName = BillToFirstName.Text;

    _Order.BillToLastName = BillToLastName.Text ;

    _Order.BillToCompany = BillToCompany.Text ;

    _Order.BillToAddress1 = BillToAddress1.Text;

    _Order.BillToAddress2  =BillToAddress2.Text;

    _Order.BillToCity = BillToCity.Text;

    _Order.BillToProvince = BillToProvince.Text;

    _Order.BillToPostalCode = BillToPostalCode.Text;

    _Order.BillToCountryCode = BillToCountryCode.Items[BillToCountryCode.SelectedIndex].Value;

    _Order.BillToPhone = BillToPhone.Text;

    int index = 0;

    foreach (OrderShipment shipment in _Order.Shipments)

    {

        RepeaterItem item = ShipmentRepeater.Items[index];

        shipment.ShipToFirstName = GetControlValue(item, "ShipToFirstName");

        shipment.ShipToLastName = GetControlValue(item, "ShipToLastName");

        shipment.ShipToCompany = GetControlValue(item, "ShipToCompany");

        shipment.ShipToAddress1 = GetControlValue(item, "ShipToAddress1");

        shipment.ShipToAddress2 = GetControlValue(item, "ShipToAddress2");

        shipment.ShipToCity = GetControlValue(item, "ShipToCity");

        shipment.ShipToProvince = GetControlValue(item, "ShipToProvince");

        shipment.ShipToPostalCode = GetControlValue(item, "ShipToPostalCode");

        shipment.ShipToCountryCode = GetControlValue(item, "ShipToCountryCode");

        shipment.ShipToPhone = GetControlValue(item, "ShipToPhone");

    }

    _Order.Save();

    SavedMessage.Text = string.Format(SavedMessage.Text, DateTime.UtcNow.ToLocalTime());

    SavedMessage.Visible = true;

    EditAddressAjax.Update();

}

And replace it with this code:

protected void SaveButton_Click(object sender, EventArgs e)

{

    _Order.BillToFirstName = BillToFirstName.Text;

    _Order.BillToLastName = BillToLastName.Text ;

    _Order.BillToCompany = BillToCompany.Text ;

    _Order.BillToAddress1 = BillToAddress1.Text;

    _Order.BillToAddress2  =BillToAddress2.Text;

    _Order.BillToCity = BillToCity.Text;

    _Order.BillToProvince = BillToProvince.Text;

    _Order.BillToPostalCode = BillToPostalCode.Text;

    _Order.BillToCountryCode = BillToCountryCode.Items[BillToCountryCode.SelectedIndex].Value;

    _Order.BillToPhone = BillToPhone.Text;

    int index = 0;

    foreach (OrderShipment shipment in _Order.Shipments)

    {

        RepeaterItem item = ShipmentRepeater.Items[index];

        shipment.ShipToFirstName = GetControlValue(item, "ShipToFirstName");

        shipment.ShipToLastName = GetControlValue(item, "ShipToLastName");

        shipment.ShipToCompany = GetControlValue(item, "ShipToCompany");

        shipment.ShipToAddress1 = GetControlValue(item, "ShipToAddress1");

        shipment.ShipToAddress2 = GetControlValue(item, "ShipToAddress2");

        shipment.ShipToCity = GetControlValue(item, "ShipToCity");

        shipment.ShipToProvince = GetControlValue(item, "ShipToProvince");

        shipment.ShipToPostalCode = GetControlValue(item, "ShipToPostalCode");

        shipment.ShipToCountryCode = GetControlValue(item, "ShipToCountryCode");

        shipment.ShipToPhone = GetControlValue(item, "ShipToPhone");

        // BEGIN MOD: AbleMods.com

        // 5/18/2011

        // bug-fix in AC705

        index++;

        // END MOD: AbleMods.com

    }

    _Order.Save();

    SavedMessage.Text = string.Format(SavedMessage.Text, DateTime.UtcNow.ToLocalTime());

    SavedMessage.Visible = true;

    EditAddressAjax.Update();

}


I checked AbleCommerce 7.0.7 and the code appears correct, not sure if 7.0.6 has it though.