How to get the price of a catalog item in a catalog UI policy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 06:27 AM - edited 11-01-2023 06:29 AM
I have a catalog item which has a variable "outside". If this field is yes, I want to add a shipping charge of 100$ to the catalog price. How do I do this?
I tried entering the following code in the Catalog UI Policies script. But it did not work.
var price = g_form.getValue("price");
price += 100;
g_form.setValue("price", price);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 06:39 AM
You can make the variable type a select box with options, such as "Yes" and "No." You can specify the price associated with each choice, as shown in the screenshot below. When you select "Yes," it will automatically populate with a value of $100.
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 07:33 AM
Did you check this?
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.