Saturday, December 22, 2018

Use JQuery to Set MasterCard as the Payment Method Automatically Selected on Payment Information page of Checkout

Here are the steps to automatically set MasterCard as the payment method selected on the Payment Information page of Checkout.

Note: This works only on a traditional (Site Builder) Checkout page & not on a Reference Checkout web store.

*Advanced Site Customization is available and enabled under Setup > Company > Enable Features > Web Presence.
*JQuery library is added to the Addition to <head> template of the Theme.

A. Create a Web Site Tag
1. Navigate to Setup > Site Builder > Tags > New.
2. Create a Web Site Tag (e.g. DEFAULTMASTERCARD) and set the Default Value to blank.
3. Save.

B. Edit the Web Site Theme to add the tag on the footer
1. Navigate to Setup > Site Builder > Themes and click on Edit for the active Theme.
2. Click on the Body tab and add the tag created in step 2 to the Footer Template.
3. Save.

C. Edit the Checkout tab to add the Tag and its Substitution Value:
1. Navigate to Lists > Web Site > Tabs.
2. Click on Edit for Checkout.
3. On the Tag Substitution tab, set: a. Tag = DEFAULTMASTERCARD b. Copy the code below onto the Substitution Value:

4. Save.

No comments:

Post a Comment