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

Product Options Dropdown Validation onChange

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-05-2010, 07:44 PM
 
ricardomz ricardomz is offline
 

Senior Member
  
Join Date: Jun 2007
Posts: 111
 

Default Product Options Dropdown Validation onChange

Hello friends

I have a store with a few products (ladders), each ladder has a unique configuration, if you want please see this:

http://www.peldanos.com/portal/product.php?productid=1&cat=0&bestseller=Y

If you see I have 3 product options, for example:
Option 1:
a
b
c
d

Option 2:
a
b
c
d

Option 3:
a
b
c
d
What I need is that the only configurations avilable are: "aaa", "bbb","ccc" and "ddd" I mean, if the user in the Option 1 select "a" then the Option 2, the Option 3 change to "a" also...

I think I could modify it with javascript, and I have some ideas but I don╢t know exactly how to apply this in X-Cart.. but, I have also see that if I change the template customer_options.tpl I can achieve this in all the store but I don't know exactly how to do it.. could some body helpme???

I think if I can set a function in "onChange" of each option and set something like this??.. I don't know??

Code:
<script language="javascript"> function check_options(select) { {foreach from=$product_options item=v} var {$v.class} = document.getElementById('po{$v.classid}'); {/foreach} switch(select) { case 1: switch({$v.class}.value) { case '2': {$v.class}.value = '{$o.optionid}'; {$v.class}.value = '{$o.optionid}'; break; } } } </script>


PLEASE, I REALLY NEED HELP !

THANKYOU!!
__________________
X-Cart 4.5.5
Litecommerce Version: 2.2.45
MИxico
Reply With Quote
  #2  
Old 01-05-2010, 08:54 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Product Options Dropdown Validation onChange

The closest I've seen anyone get to what you are after is here - but it looks quite complex.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #3  
Old 01-06-2010, 08:38 AM
 
ricardomz ricardomz is offline
 

Senior Member
  
Join Date: Jun 2007
Posts: 111
 

Default Re: Product Options Dropdown Validation onChange

Gb2World, thanks

Yes, it looks quite complex..

There's a way to do this with tha javascript validation in product options??...

Please, I need any idea, I hope someone could helpme !!

Regards!
__________________
X-Cart 4.5.5
Litecommerce Version: 2.2.45
MИxico
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:00 AM.

   

 
X-Cart forums © 2001-2020