Easy? widget help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 34m ago
Objective:
Display an info message on any given catalog item that provides the average number of delivery days expected based on current catalog item AND location (reference variable on item)
Action taken:
1. Created a variable of type Reference which points to the location table
2. Created a variable of type Custom which points to an cloned widget. The widget is empty except for the HTML:
<div id = "div1">
Estimated delivery:
</div>3. Created CSS (in the widget) that display div1 as a blue box.
4. Created the script that calculates the average number of days for the given catalog based on the location selected. This script was created in a background script. Works great for what I need. This script has NOT been added to the widget.
What I need help with:
- On the catalog form, when the location changes, I need to pass the location AND catalog item sys_id to the server script, which will then run the calculation I need
- The script will return a number, for example 5
- I'd like 5 to display after Estimated delivery above.
Example:
| Estimated delivery: 5 days |
Here's what my catalog item page looks like now:
I'm sure this is pretty simple and there's prob an out of the box widget i can reference, i just need a little guidance.
Any help is greatly appreciated-
