| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
product options validation | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
product options validation
is there any tutorials of furthur explanations on how to use the product validations option? i can't seem to get it to work properly, anyone have any better examples on how to use this and what it does?, thanks
Example: if (product_option('Cover').selectedIndex == 1) { alert('You have chosen Hard cover for this product'); return true; } |
|||||||
#2
|
|||||||||
|
|||||||||
confused
I am having trouble understanding the product options validation feature too. Did you figure it out?
Someone else have some help? Is the manual/help section going to be updated soon? |
|||||||||
#3
|
|||||||
|
|||||||
no luck
no matter what i try i can't get it to work, just displays an error on the page and then nothing works at all, does anyone know how this works, i don't beleive this many people have xcart an no one knows how to make the product validation work, rrf we explicit instructions on how to use this feature !!!!
|
|||||||
#4
|
|||||||
|
|||||||
I haven't seen this option. Where is this option you are referring to?
Dale
__________________
-- X-Cart 4.2, Fancy Categories, Affiliate |
|||||||
#5
|
|||||||
|
|||||||
under product options
the validation thing is under the product options
|
|||||||
#6
|
|||||||
|
|||||||
Hi,
I got this working! You should have an option list first where you make up your own option class (for instance MEDIA) Option Text is the displayed text. SELECT MEDIA TYPE: Option list is the list. Something like: CD-ROM=+0 (option 1 is CD-ROM and will cost +0 of your currency over the default price) Theproduct options validation can be used to manipulate things based on the selection made in the option list if (product_option('MEDIA').selectedIndex == 1) { alert('You have chose the CD-ROM option'); return true; } If you have more then one selectable item SELECTEDINDEX will increase by one for every new choice. Hope this helps? Nico |
|||||||
#7
|
|||||||
|
|||||||
yep
Hey Nico,
yep i got it working but i get errors when i change the ==1 part .Does anyone know what this part is suppose to do? if (product_option('MEDIA').selectedIndex== 1) { alert('You have chose the CD-ROM option'); return true; } i figured it was the option line number chioce. Example, if i had an option COLORS and on line 1 was red, line 2 green, line 3 blue, i figured i could put the validation to look like this if (product_option('COLORS').selectedIndex == 3) { alert('You have chosen Color Blue'); return true; } so the 'You have chosen Color Blue' would pop-up, but all i get is an error on the page, any clues would be great, Thanks - snorocket |
|||||||
#8
|
|||||||
|
|||||||
Hi,
Do the == 2 and == 3 work? If yes it's probably a Syntax error. Please paste it in the forum so we can check. Nico |
|||||||
#9
|
|||||||
|
|||||||
changing the ==1 to any other number then 1 causes an error and the shopping cart does'nt work then, i'm still poking away at it slowly
|
|||||||
#10
|
|||||||
|
|||||||
Stupid question: You DO have THREE color option, do you?
Just checking.... |
|||||||
|
|||
X-Cart forums © 2001-2020
|