X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product Options Dropdown Validation onChange (https://forum.x-cart.com/showthread.php?t=51624)

ricardomz 01-05-2010 07:44 PM

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!!

gb2world 01-05-2010 08:54 PM

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.

ricardomz 01-06-2010 08:38 AM

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!


All times are GMT -8. The time now is 01:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.