Saturday, December 22, 2018

Skip Shipping Method page on Checkout using JQuery


This works only on traditional Checkout pages, and not on the One Page Checkout. The Shipping Method page is skipped however shoppers will still need to select a Shipping Method on the Review and Submit your Order page. Below are the steps:

Adding JQuery to the Addition To <head> of the active Theme.
  1. Navigate to Setup > Site Builder > Themes.
  2. Edit the active theme.
  3. On the General tab, add the JQuery library source below onto the Addition To <head>:
      <script src="http://code.jquery.com/jquery-latest.js"></script>

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

Editing 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 <SKIPSHIPPINGMETHOD> to the Footer Template.
  3. Save.

Adding a span id marker on the Shipping Method page.
  1. Navigate to Setup > Site Builder > Customize Text.
  2. Click on the Headings tab and look for the second Shipping Method under the Default Text column.
  3. Add a span element with an id to be the page marker of the Shipping Method page. For example, add this code on the Customization column:
     <span id="shippingmethodpagemarker"></span>
  4. Save.

Editing the Checkout tab to add the Tag and its Substitution Value:
  1. Navigate to Lists > Web Site > Tabs
  2. Edit Checkout.
  3. On the Tag Substitution tab, set:
      a. Tag = SKIPSHIPPINGMETHOD
      b. Copy the code below onto the Substitution Value. Replace the paymentInformationPageURL with the link of the site's Payment Information page. For example, "https://checkout.netsuite.com/s.nl/c.XXXXX/n.1/sc.4/category.paymeth/.f?ext=F" where XXXXX stands for the Account ID.
 

  4. Save.


Disclaimer: The sample code described herein is provided on an"as is" basis, without warranty of any kind, to the fullest extentpermitted by law. NetSuite Inc. does not warrant or guarantee the individualsuccess developers may have in implementing the sample code on theirdevelopment platforms or in using their own Web server configurations.

NetSuite Inc.does not warrant, guarantee or make any representations regarding the use,results of use, accuracy, timeliness or completeness of any data or informationrelating to the sample code. NetSuite Inc. disclaims all warranties, express orimplied, and in particular, disclaims all warranties of merchantability,fitness for a particular purpose, and warranties related to the code, or anyservice or software related thereto.

NetSuite Inc. shall not be liablefor any direct, indirect or consequential damages or costs of any type arisingout of any action taken by you or others related to the sample code.

 


No comments:

Post a Comment