Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...


How to change Smart One Page Checkout shipping method look

We would like to add the date of delivery that we pull from FedEx to what is shown to the customer in smart one page checkout. Is this something that can only be done with source?
asked Oct 10, 2013 in Smart One Page Checkout by chrismartz (130 points)
recategorized Oct 11, 2013 by Vortx Nicole

1 Answer

0 votes

I think that will depend on how you're pulling/storing the delivery date into your database and how you want to display it. I would start with web/OPCControls/ShippingMethodSelector.ascx, the shipping display starts around line #17. 

<div id="shippingMethodListWrap">
                <asp:RadioButtonList runat="server" ID="ShippingMethods" AutoPostBack="true" OnSelectedIndexChanged="ShippingMethods_SelectedIndexChanged" />


You'll need to get into the codebehind to pull in your new value. It might be tricky to display a date per shipping method, looks like it should be doable without full SOPC source though.

answered Oct 10, 2013 by Vortx Nicole (790 points)
Thanks for your reply Vortx Nicole! I have looked in the codebehind but it looks to do a databind to pull the listing in. Is this defined in regular 9.4 source by chance and the OPC just references it like other elements on the page do?
Does anyone have any other suggestions?

The function that populates the RadioButtonList uses the following:


        ShippingMethods.DataSource = shippingMethods;
        ShippingMethods.DataTextField = "DisplayName";
        ShippingMethods.DataValueField = "Identifier";
How can that be modified to append a string to the DisplayName data field?
Depending on when/how you're getting those dates from FedEx, your best bet would probably be to add that text where the main realtime shipping call is done and the list of shipping methods is built up.  SOPC uses the shipping logic in AspDotNetStorefrontCore (RTShipping.cs, FedEx.cs, etc) so as long as you have source code that shouldn't be hard to do.

Otherwise you're going to have to parse through ShippingMethods.Items after it's bound and add your text to the values in there.