Friday, May 31, 2019

Reference Checkout: Display A Custom Transaction Body Field on Checkout and Save Value in Sales Order

Image


Applicable for the following version:
Reference Checkout 2.0 - 2.05 (Bundle ID 69019)

Note: This solution is only applicable if user only has 1 custom transaction body field. For Reference Checkout with more than 1 custom body field, please see SuiteAnswers Answer ID 46004.

Requisites:
  1. Custom Checkout folder is already populated with files copied from the Reference Checkout folder.
  2. Custom Checkout Touchpoint is deployed.
  3. A Transaction Body field has been created where Web Store = T and Store Value = T.

Steps:

  1. Navigate to Documents > Files > File Cabinet > Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. - Checkout > Custom Checkout > templates > order_wizard and edit order_wizard_showshipments_module.txt.
  2. Add the script below on the template before the closing section:

    * custbody_message is the id of the transaction body field

  3. Save. The custom transaction body (free-form text) field should display on the section above the Place Order button and below the Items list.

  4. Take note of the id used (e.g.#custbody_message)

        5. Navigate to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. - Checkout > Custom Checkout > js > src > app, and edit Configuration.js.

        6. Find OrderWizard.Module.TermsAndConditions then add code inside the save function like below:

                

        7. Save.

        8. Navigate to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. - Checkout > Custom Checkout > services, and edit live-order.ss

        9. Add code before the comment '// Finally Submits the order' : 

                

        10. Save. 
        11. Ensure that the Application.js file in Custom Checkout>js folder is updated
          a. If it is not updated, edit the Application.js file and make no changes
          b. Click on Save
          This will trigger the update.

    Though the custom_message value is not displayed in the json, it is still passed over to the Sales Order record.
                

No comments:

Post a Comment