Javascrpt to show Quantity
Hello
Maybe i am trying to do this in the wrong place. but here goes
I would like the user to know how many items she ordered via a JS popup before the items get added to the cart.
I have the following to show what she selected but it does not show how many she ordered from the Select Quantity Box.
So if she ordered 3 items can I get the pop-up to show she ordered 3 items.
The JS validation I started to give the idea what she ordered is below but I do not know how to show the quantity. Is it possible to show the quantity? I was wondering if it was a simple task to let the user know how many items she is ordering via javascript validation.
Below is what I have so far.
var obj = product_option("color");
if (obj && obj.selectedIndex == 0) {
r=confirm("You Selected a Red Poker Chip with Red Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips");
if (r==true) {
return true;
} else
{
return false;
}
}
else
if (obj && obj.selectedIndex == 1) {
r=confirm("You selected a Red Poker Chip with Black Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips ");
if (r==true) {
return true;
} else
{
return false;
}
}
else
if (obj && obj.selectedIndex == 2) {
r=confirm("You Selected a Black Poker Chip with Red Text \n For each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips");
if (r==true) {
return true;
} else
{
return false;
}
}
else
if (obj && obj.selectedIndex == 3) {
r=confirm("You Selected a Black Poker Chip with Black Text \nFor each Quantity Ordered You will Receive 1 Bag of 200 Poker Chips ");
if (r==true) {
return true;
} else
{
return false;
}
}
Thanks for any suggestions on this.
__________________
X-Cart version 4.6.4 GOLD
X-Cart version 4.6.1 GOLD
X-Cart version 4.5.5 GOLD
X-Cart version 4.5.4 GOLD
X-cart Version 4.5.3 GOLD
X-cart Version 4.4.3 GOLD
X-cart Version 4.4.2 GOLD
PHP 5.3.27
MySQL client 5.5.37
Linux
|