View Single Post
  #6  
Old 08-09-2007, 06:55 AM
  hrothbeorht's Avatar 
hrothbeorht hrothbeorht is offline
 

Senior Member
  
Join Date: May 2007
Posts: 156
 

Default Re: variations javascript help

I got it working.

I thought I'd share the script I came up with.
This goes in the Validation script window on the bottom of the product options page.

Code:
var value = product_option_value("men_size"); var value2 = product_option_value("colour_001"); var value3 = product_option_value("men_size"); var value4 = product_option_value("colour_001"); if ((value !== 'XL' && value !== 'L' && value !== 'M' && value !== 'S') && (value2 !== 'black' && value2 !== 'offwhite')) { alert("Please select the size and colour"); return false; } if (value3 !== 'XL' && value3 !== 'L' && value3 !== 'M' && value3 !== 'S') { alert("Please select a size"); return false; } if (value4 !== 'black' && value4 !== 'offwhite') { alert("Please select a colour"); return false; }

works nice now - WOO!!
far from the ideal solution but hey.. it's doing what I needed it to!

-hroth
__________________
x-cart- 4.1.10
www.boutiquefinn.ca
Reply With Quote