- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 09:09 PM
Hi ,
I am currently using HELSINKI version .
As per my requirement I am using Multiple choice type variable which has two options "greater than 5" and " less than 5" for the first option "greater than 5" I have to show all the related following questions and for other options i.e less than 5 I have to hide those questions .Which is working fine .
But when less than 5 option is selected I have to hide "Add to Cart" and "Order Now " button which will restrict user from submitting order .
Tried the client script by using below but nothing seems to work, and the questions which needs to be hide are not hiding any more after using below.
$('order').hide();
$('cart').hide();
document.getElementById('order_now').hide();
I have used following client script:
function onChange(control, oldValue, newValue, isLoading) {
//Type appropriate comment here, and begin script below
if (isLoading || newValue == '') {
// alert("Returing");
return;
}
var request = g_form.getValue('application_details_user');
if(request == 'Greater than 5')
{
alert("greater than 5 option is selected");
g_form.clearValue('Greater than 5');
}
else(request == 'Less than 5')
{
alert("less than 5 option is selected");
g_form.clearValue('Less than 5');
//$('order').hide();
//$('cart').hide();
// document.getElementById('order_now').hide();
// document.getElementById('add_to_cart_button').style.display='none';
}
}
Thanks In Advance
Deepti
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2016 07:37 AM
Hi Deepti,
To hide entire cart and frames, I used the following catalog client script:
function onLoad() {
var cart = document.getElementById('order_and_cart_v2');
cart.style.display='none';
}
We are on Helsinki as well.
Maria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 10:04 PM
Use Below code in client script.
var ordernow = document.getElementById('order_now');
ordernow.style.display='none';
var addtocart = document.getElementById('add_to_cart_button');
addtocart.style.display='none';
Thanks,
Mihir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 11:01 PM
Hello Pradeep ,
Thanks it worked for me.
Please let me know how to get this value or where to find it 'oi_order_now_button' ?
$('oi_order_now_button').hide();
Thanks,
Deepti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2016 11:59 PM
Hi ,
I am currently using HELSINKI version .
As per my requirement I am using Multiple choice type variable which has two options "greater than 5" and " less than 5" for the first option "greater than 5" I have to show all the related following questions and for other options i.e less than 5 I have to hide those questions . .
When Greater than 5 option is selected I have to refresh my screen to see " Order Now Button" is there something I need to add in below code?
Earlier my requirement was to hide 'Order Now Button' and 'Add to cart Button' , when "Less than 5 " is selected but now I have to hide Entire Frames including "Shopping cart" and "Empty" value " show below for particular catalog
I have used below client script :
function onChange(control, oldValue, newValue, isLoading) {
//Type appropriate comment here, and begin script below
if (isLoading || newValue == '') {
// alert("Returing");
return;
}
var request = g_form.getValue('application_details_user1');
if(request == 'Greater than 5')
{
// alert("greater than 5 option is selected");
//g_form.clearValue('Greater than 5');
}
else(request == 'Less than 5')
{
//alert("less than 5 option is selected");
// g_form.clearValue('Less than 5');
gel('qty').firstElementChild.childNodes[0].style.display = 'none';
sc_delivery_time_label_cell.hide();
sc_delivery_time_cell.hide();
quantity_label_span.hide();
quantity.hide();
$('oi_order_now_button').hide();
$('oi_add_to_cart_button').hide();
// shopping.hide();
}
}
Which gives me below output :
I don't require those frames too.
And Please let me know how to find the values or rather where to find it ?
$('oi_order_now_button').hide();
$('oi_add_to_cart_button').hide();
Any help will be appreciable .
Thanks Deepti