Validate Selection of Colors and Sizes
I looked at your example and went back to square one but still no success with validation.
I am posting data from the product details form to the eCart. I put my validation code on the eCart page. My Validation is for a required/not blank field. If validation fails, the eCart code is supposed to redirect to the product detail page.
1) The code does not redirect back to the product detail page. I'm sure it would need to have the item id in order to redirect back to the right product but that info doesn't seem to carry over in a format I can use to call the right item - such as "product_Details.cfm?MerchID=62"
I then placed the "showif" code on the product detail page. Now when I go back to the product detail page it is always displaying the error message.
Here's the showif code on the product details page:
<cfif (ValidatedField("cart","cart") NEQ "")>
<cfif ((Find("," & "1" & "," , "," & ValidatedField("cart","cart") & ",") GT 0 OR "1" EQ ""))>
<cfif (NOT(false))>
<span class="error"><img src="../images/icons/exclamation.jpg" alt="Error!" /> Please make a selection!</span>
<!--- WAFV_Conditional cart.cfm cart(1:) --->
</cfif>
</cfif>
</cfif>
I also need some kind of qualifier code for the "keep shopping" button in the cart because it tries to go to the product detail page but since there is no merchid, it just displays and "item not found" message.
I'm sure both redirects (validation failure) and (keep shopping) need some kind of #cgi.query.string# but I can't seem to figure it out.
PS - since I posted this I removed the validation from the cart page and now the "keep shopping" function works - so something about the validation caused a problem with that.