Able Gold no longer has a 'One Page Checkout'. The checkout in Gold is now broken up into separate pages, so it's much easier to make changes such as this one.
First, find the /Checkout/ folder in your site and edit the ShipMethod.aspx file. Find this line of code:
Code: Select all
<asp:DropDownList ID="ShipMethodsList" runat="server" DataValueField="Key" DataTextField="Value"></asp:DropDownList>
and change it to look like this:
Code: Select all
<asp:RadioButtonList ID="ShipMethodsList" runat="server" DataValueField="Key" DataTextField="Value"></asp:RadioButtonList>
Now save the file. The next step is to change the programming code for this page. Find the ShipMethod.aspx.cs file in the same /Checkout/ folder. Edit the file and find this code:
Code: Select all
protected void ShipmentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
//CAST DATA ITEM
BasketShipment shipment = (BasketShipment)e.Item.DataItem;
//UPDATE SHIPPING WEIGHT
Literal shipWeight = (Literal)e.Item.FindControl("ShipWeight");
if (shipWeight != null)
{
shipWeight.Text = string.Format(weightFormat, shipment.Items.TotalWeight());
}
//SHOW SHIPPING METHODS
DropDownList ShipMethodsList = (DropDownList)e.Item.FindControl("ShipMethodsList");
Now replace that code with this code:
Code: Select all
protected void ShipmentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
//CAST DATA ITEM
BasketShipment shipment = (BasketShipment)e.Item.DataItem;
//UPDATE SHIPPING WEIGHT
Literal shipWeight = (Literal)e.Item.FindControl("ShipWeight");
if (shipWeight != null)
{
shipWeight.Text = string.Format(weightFormat, shipment.Items.TotalWeight());
}
//SHOW SHIPPING METHODS
// BEGIN MOD: AbleMods.com
// 12/13/2012
// use radio buttons for ship methods
RadioButtonList ShipMethodsList = (RadioButtonList)e.Item.FindControl("ShipMethodsList");
// END MOD: AbleMods.com
Once that is done, we have one more change to make in the same file. Find this code:
Code: Select all
protected void ContinueButton_Click(object sender, EventArgs e)
{
//LOOP SHIPMENTS, GET SHIPPING METHODS
Basket basket = AbleContext.Current.User.Basket;
IList<BasketShipment> shipments = basket.Shipments;
_ShipmentIndex = 0;
bool allMethodsValid = true;
foreach (BasketShipment shipment in shipments)
{
// shipment.ShipMethod = ShipMethodDataSource.Load(AlwaysConvert.ToInt(Request.Form["ShipMethod" + _ShipmentIndex]));
DropDownList ShipMethodsList = ShipmentRepeater.Items[_ShipmentIndex].FindControl("ShipMethodsList") as DropDownList;
and replace it with this code:
Code: Select all
protected void ContinueButton_Click(object sender, EventArgs e)
{
//LOOP SHIPMENTS, GET SHIPPING METHODS
Basket basket = AbleContext.Current.User.Basket;
IList<BasketShipment> shipments = basket.Shipments;
_ShipmentIndex = 0;
bool allMethodsValid = true;
foreach (BasketShipment shipment in shipments)
{
// shipment.ShipMethod = ShipMethodDataSource.Load(AlwaysConvert.ToInt(Request.Form["ShipMethod" + _ShipmentIndex]));
// BEGIN MOD: AbleMods.com
// 12/13/2012
// Use radio buttons for ship methods
RadioButtonList ShipMethodsList = ShipmentRepeater.Items[_ShipmentIndex].FindControl("ShipMethodsList") as RadioButtonList;
// END MOD: AbleMods.com
Now save the file and test your page. You should be all set!