Page 1 of 1

Adding Options to Checkout

Posted: Mon Jun 18, 2012 11:49 am
by eflow
At Checkout under shipping address (2) radio buttons with ship to options is standard.
We need to include Pickup and Delivery controls at this point.

HOW TO ADD:

<input id="ctl00_wpm_CheckoutPage_ctl03_PickUpAtStore" type="radio" name="ctl00$wpm$CheckoutPage$ctl03$UseShippingAddress" value="PickUpAtStore" onclick="javascript:setTimeout('__doPostBack(\'ctl00$wpm$CheckoutPage$ctl03$PickUpAtStore\',\'\')', 0)" />

<input id="ctl00_wpm_CheckoutPage_ctl03_PickUpAtStore2" type="radio" name="ctl00$wpm$CheckoutPage$ctl03$UseShippingAddress" value="PickUpAtStore2" onclick="javascript:setTimeout('__doPostBack(\'ctl00$wpm$CheckoutPage$ctl03$PickUpAtStore\',\'\')', 0)" />

<input id="ctl00_wpm_CheckoutPage_ctl03_DeliveryfromStore" type="radio" name="ctl00$wpm$CheckoutPage$ctl03$UseShippingAddress" value="DeliveryfromtStore" onclick="javascript:setTimeout('__doPostBack(\'ctl00$wpm$CheckoutPage$ctl03$PickUpAtStore\',\'\')', 0)" />

Anyone?

Re: Adding Options to Checkout

Posted: Mon Jun 18, 2012 3:47 pm
by david-ebt
Are you using all of the ship to fields? ShipToFax is a field in the database that isn't being displayed on the OnePageCheckout form so that's a potential field. It is displayed on the MyAccount pages and the single page checkout.

What we've done is just create the new controls in the OnePageCheckout form and then store the data in the ShipToFax field. You can find all the places where you should put your code to read or set the new radio buttons by searching for "ShipToPostalCode" in the OnePageCheckout.ascx.cs file. You would add new lines to read from your radio buttons or set the value of your radio buttons.

You'll also need to update the EditShipAddressPage so it doesn't display the Fax number to the consumer.

If you want the information to display properly in the Admin system, you'll need to update the Admin\Orders\Shipments\EditShipment and AddShipment pages to change the ShipToFax to display your new pickup options.

If you need to store more than one value you can always put both values in the ShipToFax field as a delimited set of values. That field can hold 50 characters so you can do something like this if you need to:

Code: Select all

pickupAtStore1,deliveryFromStore
Hopefully that will get you started.