The ShoppingCartModifier
component handles claiming gift certificates and placing them into the purchase information for an order. It relies on two key pieces: having the property giftCertificateNumbers
be populated with a String that represents white space separated gift certificate claim numbers and calling the moveToConfirmation
method of the ShoppingCartModifier
on form submission. This is how we set up the use of gift certificates in the Pioneer Cycling store:
In the two pages that deal with payment in the Pioneer Cycling store, PaymentInfo.jsp
and PaymentInfo2.jsp
, we generated an input field where customers can type in the claim codes for their gift certificates. Then, the submit
value of the form gets set to moveToConfirmation
. This is what the JSP looks like:
If you have gift certificates, type their codes below<br> <dsp:input bean="ShoppingCartModifier.giftCertificateNumbers" size="50" type="text" value=""/><br>
<%/* submition handle */%> <dsp:input bean="ShoppingCartModifier.MoveToConfirmation" type="submit" value=" Continue --> "/>