Create a confirmation alert/popup window for catalog items with a price

Jimmy45
Giga Guru

Hello community!

 

I have a customer requirement to display a popup (Confirmation Window) that requires the user to click OK when the following occurs:

Verbiage:  "The Catalog Item you are viewing has a Price associated to it and will trigger Director Level Approval if ordered"

What will trigger the Alert box

  • User clicks on a catalog item within CATALOG A and the price for that item is greater than $0.00

This is only to target Catalog items in Catalog A and no other Catalogs.

 

Does anyone know how I could achieve this?  Catalog Script? 

Thank you in advance!

3 REPLIES 3

Kunal Varkhede
Tera Guru

Hi,

 

Use OnSubmit() client script 

 

function onSubmit() {
   
      var val =confirm('Submit a priority one ticket?');
      if(val)
      {
          return true;
       } 
}

 

Verbiage:  "The Catalog Item you are viewing has a Price associated to it and will trigger Director Level Approval if ordered"

- For this you need to configure the workflow

 

Thanks,

Kunal.

Thank you @Kunal Varkhede -  However, I want this to display after the user clicks on the Catalog Item.  Not when they order it.  Like below example:

  1. User Visits the portal
  2. User goes to Catalog A
  3. User sees the Categories of Catalog A
  4. User goes to Monitors Category
  5. User clicks on 27" Samsung Monitor in Monitors Category that has a price of $227
  6. Message/Alert Appears advising: "The Catalog Item you are viewing has a Price associated to it and will trigger Director Level Approval if ordered"
  7. User Clicks Ok to acknowledge they understand
  8. User proceeds to view the product and if they like, can add to the cart of click "Order Now" button.

Does that make sense?  Typically the Workflow doesn't trigger until the Catalog Item is ordered correct?  We want them to see this before they order the item or add to their cart.

Then create a catalog item client script

- On load

function onLoad() {
    alert('your text here');
}

 

Make sure to set the UI type to All