[ic] shipmode validation

Mark Johnson mark at endpoint.com
Tue Dec 9 15:02:15 UTC 2008


Adam Lambert wrote:
>> That said, you should seek to incorporate this kind of logic into a  
>> form profile that gets checked when checkout.html is submitted, rather  
>> than incorporating it into the confirm page.
>>   
>    
>     How would I get it to check those values after checkout.html but
> before confirm.html?   The problem I am having, is that some users
> disable javascript in their web browsers which is what creates the
> problem I am trying to solve - which is that users can set country code
> to US, turn off javascript, and then fill in, say South Africa in
> checkout.html and only get charged the US shipping amount.

That is precisely the purpose of the form profile Carl mentions. You
invoke the profiles by specifying the name in either mv_form_profile or
mv_order_profile (they have important differences; on checkout, you
almost certainly want to use mv_order_profile) in the form.
mv_form_profile is executed with *any* FormAction; mv_order_profile only
executes with a 'submit' FormAction. That "catches" the process between
submission of the form, but before the page code in the target (or the
order routing in the case of a 'submit' FormAction) takes place.

Brief basics:
http://www.interchange.rtfm.info/icdocs/Form_and_order_profiles.html

List of most common profile checks:
http://www.icdevgroup.org/interchange-doc-5.2.0/frames/ictemplates_36.html


--
Mark Johnson
End Point Corporation
http://www.endpoint.com



More information about the interchange-users mailing list