Deploying and Running Scriptable Cart

Scriptable Cart runs customized sales order forms you select as Scripting Templates. These sales order forms contain the order while customers are shopping on your web store. Your custom SuiteScript is attached to these forms.

To run SuiteScript in the shopping cart, an administrator must enable the following features: Advanced Site Customization, Client SuiteScript.

Note that creating a script record is the first step when using SuiteScript in the shopping cart, however it is the fourth step when creating a script in a non-web store context. For general information about creating a script record, see SuiteScript 1.0 Documentation.

To deploy a script in the shopping cart:

  1. Go to Customization > Forms > Transaction Forms.

    Customize a sales order form for use in the shopping cart by attaching SuiteScript. If you use terms for your customers, you must attach your script to both types of sales order forms: cash sale and invoice. For more information read the FAQ topic, What type of sales order forms can I use for the Scriptable Cart?

    Note:

    It is important that the fields on the custom sales order form correspond with features you have enabled in your account. For example: If you use a script that reads revenue recognition fields, you must include these fields on your custom sales order form.

  2. Go to Commerce > Websites > Website List.

    Click Edit next to the required website.

  3. Click the Setup tab.

  4. In the Preferences section, check the Scriptable Cart and Checkout box.

  5. Set the Scripting Templates for your site:

    • Scripting Template (Credit Card) - Select your customized Sales Order - Cash Sale form.

    • Scripting Template (Invoice) - Select your customized Sales Order - Invoice form.

  6. Click Save.

Now, based on the sales order form you select as a Scripting Template, your custom script executes against data in the shopping cart.

Important:

When you set a script deployment record to Released, you must select the correct customer center role for the script to execute in the shopping cart. The role you select on the script deployment must be the same customer center role you have selected in the Default Role for New Customers field at Setup > Company > General Preferences.

Before you deploy a script to run in the shopping cart, NetSuite recommends you test your script thoroughly. For more information, see Testing and Debugging Scriptable Cart.

For more information about the client events available in the Scriptable Cart, see SuiteScript for Scriptable Cart.

Related Topics

General Notices