- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 02:36 AM
in shopping cart page, before checking out can we get the details of items present in the cart and their variables in script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 03:21 AM
If you need to do Glide record, here is the sample code.
var sc = new GlideRecord('sc_cart');
sc.addQuery('user',gs.getUserID());
sc.query();
if(sc.next()){
var item = new GlideRecord('sc_cart_item');
item.addQuery('cart',sc.sys_id);
item.query();
while(item.next()){
var options = new GlideRecord('sc_item_option');
options.addQuery('cart_item',item.sys_id);
options.query();
while(options.next()){
gs.print("Question:" options.item_option_new.getDisplayValue());
gs.print("Question:" options.value.getDisplayValue());
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 02:48 AM
The details will be available in sc_cart table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 02:51 AM
how to fetch those details from sc_cart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 02:59 AM
You need to client script on sc_cart table, which does a GlideAjax fetch details.
The client script runs in shopping cart page.
You can refer OOB "set location" client script on sc_cart table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2017 03:09 AM
fortunately i know the procedure what you have mentioned.
my only concern is how to fetch the variable details of item present in shopping cart