Using Choice Validation with Quantity on Shopping Cart pages

Miscellaneous Actinic / SellerDeck patches and anything not covered above.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Using Choice Validation with Quantity on Shopping Cart pages

Post by norman »

To use Choice Validation on Quantity on Shopping Cart pages have to edit the layout you use for the add to cart button and add the following code to the cart button tag:

Code: Select all

onclick="return validateattributes(this.form,'<actinic:variable name="ValidateDateMessage" encoding="perl" selectable="false" />');"
E.g. your cart button code may look like:

Code: Select all

<input type="image" 
   src="<actinic:variable name="CartButtonImage" />"
   name="_<Actinic:Variable Name="ProductID"/>" 
   alt="Add to Cart"
   />
And change to:

Code: Select all

<input type="image" 
   src="<actinic:variable name="CartButtonImage" />"
   name="_<Actinic:Variable Name="ProductID"/>" 
   alt="Add to Cart"
   onclick="return validateattributes(this.form,'<actinic:variable name="ValidateDateMessage" encoding="perl" selectable="false" />');"
   />
Note that the Cary button layout may contain 2 ocurrences of the imput tag, so you may have to add the line twice.
Norman
Post Reply