How to show an image on a Catalog Item?

Luuk Vonk
Tera Guru

Hi,

 

We want to create a printing service, with options about paper size, the color of the front page, etc... To give this an easy look and feel we want to let the customer select an option with an image instead of text. For example we don't want a bullet with the word "landscape" but we want to show an image of an landscape page.

 

Thanx for your help!

1 ACCEPTED SOLUTION

Slava Savitsky
Giga Sage

You can write a UI macro that will render whatever you like and then add it to your catalog item as a variable of "Macro" or "Macro with Label".


View solution in original post

9 REPLIES 9

Hi Slava,

     I want to do the same thing, but how do I set up the UI Macro.

This will be my first time doing this. Can you help with a little more detail?

Thanks,

Karen

Luuk Vonk
Tera Guru

I still needed to share the code for the Client Script.



function onLoad() {


    //Use images instead of checkboxes



    //Hide the checkboxes


    g_form.setDisplay('portrait', false);


    g_form.setDisplay('landscape', false);


   


      //set fields form image


    document.getElementById('portrait').onclick =   function() {


          g_form.setValue('portrait', true);


    }


         


    document.getElementById('landscape').onclick =   function() {


          g_form.setValue('landscape', true);


    }


}


where I should save the images ( portrait , landscap) in service now ?




I added them via System UI > Images.


Community Alums
Not applicable

Hey, Please share the jelly script for this UI Macro.