How to display RITM info to Service Portal Cart?

Bob20
Tera Contributor

I'm trying to modify the Service Portal cart to show the Short Description on SP Cart (both large and small views). I have made a clone of the Cart widget and the cart template, however I can't seem to find the information I need to edit the widget to show on the RITM Short Description in the cart view. Currently the OOTB view is like this:

Cart.PNG

What I'm hoping to achieve to has it look like this:

New Capture.PNG

I had look through various Community posts and thought that this might work...

{{::data.sc_cat_item.short_description}}   -   However it does not return any data. I'm clearly missing something.

The "Design request: Rack Cards for Rec Centre Promotion" in the example is just a hack, but is the actual Short Description of the RITM. I know that the Widget loops through the items in the cart and populates the page table with the data it pulls from the RITM for things like cost. We do not   use cost/qty in our case and that has already been removed.

Might anyone be able to provide clear direction on this?

Thanks.

Bob.

14 REPLIES 14

Thank you Bob! I'd really appreciate it! 🙂

 

Yeny

Bob20
Tera Contributor

OK, here goes... I hope I'm remembering this correctly.

I started by duplicating the two shopping cart templates (large & small)

Go into Service Portal/Service Portal Configuration/Portal Tables/Angular ng-template - making copies of the "large_shopping_cart.html" and "small_shopping_cart.html". Just rename and use Insert and Stay.

I then added the code for the variable value line into the html code.
<p ng-if="item.variables.question"><b>{{::item.variables.value}}</b></p>   -  See attachments.

I then cloned the "SC Shopping Cart" widget and inserted the code to the server script (see attachments). Note that the script refers directly to the name of the variable you want to appear in the cart. In my case it's "u_mr_job_name". Look for it in the code and replace it with the var you need.

I then created a new shopping cart page "Marketing Shopping Cart" and dropped the new widget into the page.

The next bit was to get the cart button on the portal to refer to the new shopping cart. For that once more I had to clone the widgets "Header Menu"  to "Marketing Header Menu", then get the widget to use the new cart template.
data.cartWidget = $sp.getWidget("mp-shopping-cart", {cartTemplate: "mkt_small_shopping_cart.html"});

But now you need the new header widget to be referenced by the Portal. I configured the portal itself to use the new menu. Honestly right now looking at the header menu stuff I'm a bit lost again. I think I had created a new header and header menu with the header hosting the header menu. I've attached those two as well.

All this is so confusing... I hope this helps... 

 

Bob.

Hi Bob, 

 

I really appreciate your response! For now, my company only wanted to update the large shopping cart template so I didn't have to create a header one.

I had to add 3 different reference variable columns in the shopping cart so i got a little creative with the server script lol and this definitely helped!

This was my end result

find_real_file.png

 

Thank you again for your help!

 

Yeny

Amy Lind1
Giga Guru

Hi Bob!  

I'm trying to accomplish this, but I am still learning about custom widgets.  I've cloned both the widget and the template. I wonder if you might provide a bit more guidance in terms of where/how to place these code segments.

 

Thanks!  

Got it figured out!  I had to update the Cart Template on the Instance Options for the cloned Widget to the new large_shopping_cart template.