Hello!
I have a question regarding order fields:
I have created a custom order field in backend as an integer. Its default value is 0.
I now have added radio buttons in the loop so it iterates the amount of radio buttons.
However, I'm currently struggling with trying to get the radio buttons send the parameter
with the radio button.
The foreach loop is for Shippingmethods and I have set up an if/else case.
However the orderfieldvalue isn't changing. I have tried (a razor code page):
@foreach (LoopItem i in GetLoop("Shippingmethods")) { var orderLineFieldCollection = new OrderLineFieldCollection(); var order = new Order(); var eFreight = order.OrderFieldValues.GetOrderFieldValue("eFreight").Value; if(GetValue("Ecom:Cart.Shippingmethod.ID") == "SHIP13") { eFreight = "1"; } else { eFreight = "0"; } <input type="radio" onclick="" value="@eFreight" id="Radio1" onchange="" name="p"/> @i.GetValue("Ecom:Cart.Shippingmethod.Name") <br/> }
What am I missing for the eFreight value to work?