Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Javascrpt to show Quantity

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-16-2013, 05:01 AM
 
momentum momentum is offline
 

Senior Member
  
Join Date: Jun 2011
Posts: 120
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:55 AM.

   

 
X-Cart forums © 2001-2020