View Single Post
  #35  
Old 08-27-2009, 08:37 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Product Options Dropdown "Select XXXX..."

I hate to beat a dead horse but I am having trouble with this.

I put this code in customer_options.tpl before {foreach from=$v.options item=o}
<option>Select {$v.classtext|default:$v.class}...</option>

Then added this to the product option java box

if (document.getElementById('po3').selectedIndex == 0)
{ alert('Please select a size for your item.'); return false;
}
if (document.getElementById('po4').selectedIndex == 0)
{ alert('Please select a color for your item.'); return false;
}
else return true;

When I go to the product the page loads fine but when you click add to cart the page pops the old warning triangle in the bottom left of IE.

For all items with an option my first option is None Selected. All I want is a warning box to pop when an absent minded customer trys to add the None Selected to the cart.

Mike
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote