Creating Customer-Facing Messages from Scriptable Cart
Use Web Site Tags with Scriptable Cart to create messages that display in your web store. The content for your message is captured in a custom field, or any field on your Scriptable Template sales order, and then displayed on your site wherever you use Scriptable Cart Message Tags.
Scriptable Cart Message Tag |
Notes |
---|---|
<%=getField( fieldname )%> |
|
<%=setField( fieldname, value )%> |
|
<%=getCartLineField( fieldname )%> |
|
You can combine these tags to communicate with your customers using either page-level or cart-level messages. The getField()
and setField()
tags display messages on any page of your site. The getCartLineField()
tag displays a message on the cart page, or on a specific line in the shopping cart.
You can also customize an error message triggered by a failure in the validateLine event. For more information, see Custom Error Messages for ValidateLine Events.
To create a Scriptable Cart message, follow these general steps:
-
Create a custom field for displaying your message, or for page-level messages, choose an existing field from your Scriptable Template sales order.
-
Customize your Scriptable Template sales order form to include the custom field for the message. Or, if you choose to use an existing field, note the field's internal ID.
-
Write the script you will use to generate the message, including Scriptable Cart message tags.
-
Attach your script to the sales order form attached to the scriptable cart.
-
Add HTML along with Scriptable Cart message tags to the appropriate fields in NetSuite based on the type of message you plan to display on your site.