- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 04:34 PM
I'm trying to add a new check box field to the Istanbul Service Portal Shopping Cart, with the ultimate goal of the true/false value making its way to the Request, but, I'm stuck.
What I've done so far:
- I've created the appropriate column on sc_request
- I've modified the 'large_shopping_cart.html' Angular ng-template to get the appropriate field on the Portal page
- I've modified the 'SC Shopping Cart' Widget Server Script and Client Controller so that everything is processed properly. I've logged what is being returned on submit, so I know we're working up until this point.
This is where things get a little fuzzy for me. From what I can tell, the 'SPCart' Script Include is called from the widget and all the appropriate data is sent on it's way. But I don't know what to do from here?
Has anyone done something similar on the Portal Shopping Cart that can point me in the right direction?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 01:29 PM
I just completed adding a few fields to the Service Portal shopping cart. From what I can tell that is part of the backend process that we do not have access to. I ended up creating a new Script Includes with my logic and inherited the SPCart script.
One thing I was held up on, I have minimal knowledge of the shopping cart structure, you must add whatever fields you are wanting to both the sc_request and the sc_cart tables. Then I just used this article for the cartpop since I was adding more than one new field.
There may be an easier/new way to do it with the Service Portal but I haven't seen any documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 08:12 AM
Did you create a business rule to translate the XML in u_cart_value?
Type: Business Rule
Table: sc_request
When: Before
Insert: True
Condition: !current.u_cart_values.nil()
(function executeRule(current,previous){
//Translates the XML in the cart values field, which are inserted when checking out the cart. The values are inserted into the appropriate fields
readCartValues();
function readCartValues(){
//Get the values to populate and split into name/value pairs
var xmlString = unescape(current.u_cart_values);
var helper = new XMLHelper(xmlString);
var obj = helper.toObject();
for(var label in obj){
if(JSUtil.notNil(obj[label])){
var textContent = obj[label];
current.setValue(label, textContent);
}
}
}
})(current,previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 09:47 AM
thanks Dustin,
i added the script, see my above screenshot after adding in can see the values in Cartvalues and i am able to place in the String field not reference field .
Please note if i comment the below code (auto population) its working fine
worst case , how can i push those string values into Reference field.:(

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2018 06:24 AM
Hi Jan,
Are you able to manage the solution for this. If I am not populating the values in the checkout screen, values are properly updating in the request.
Am also facing the similar issue. Could you provide your input on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2018 12:29 AM