[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] newbie checkout question: mandatory shipping address


Michael Goldfarb wrote:

Esteemed ic-guys:

This must be a pretty easy one and doubtless well documented but I've
trawled the archived and rtfm with no joy.

I'm doing a site where the shipping and delivery addresses must both
be entered and I can't figure out how to insist the user enters both.
I've copied code of this sort:

	  <tr>
	    <td align="right" class="contentbar1">
	      <b>First Name</b>
	    </td>
	    <td align="left" class="contentbar1">
	      <INPUT TYPE=text NAME=b_fname VALUE="[value b_fname]"
size="20" maxlength="20">
	    </td>
	    <td class="contentbar1"><b>Last Name</b></td>
	    <td align="left" class="contentbar1">
	      <INPUT TYPE=text NAME=b_lname VALUE="[value b_lname]"
size="20">
	    </td>
	  </tr>

to replace the collection of the billing address in the foundation
code (this is cribbed from the code that collect the shipping info) but
it doesn't complain if the input field is blank.

My guess is that somewhere there lurks something that tells IC what
needs checking here but I can't find it. Help greatly appreciated.

Take a look at etc/profiles.order to see how required fields are
handled.

For instance, let's say you wanted something labeled Delivery Address to
be required whose associated form field name was "d_address".

Here would be your steps.

1. Add something like this for the label of the field:
[error name=d_address std_label="Delivery Address" required=1]

2. Give it a form field like:
<INPUT TYPE=text NAME=d_address size="20">

3. Make this entry into the proper place in profiles.order:
d_address=required

4. I think you need to restart IC, but I cannot remember.

One problem I encountered with this process a couple months ago was that while in the account page, if the first half was completed and the person attempted to save the page without completing the second portion, the errors would be presented but nothing would stop them from leaving that page with the account 'partially' setup. Later, they would start checking out with an incomplete profile and in our case, this problem was compounded because we do not allow the users profile to be altered during the checkout phase, so there wasn't the 'second' chance to revalidate the profile.

I couldn't find another way of dealing with that, so we just inserted manual field validations on entry into the checkout page and if mandetory fields were blank, the page was bounced to the accounts page. Anyone else have this same problem and found a 'cleaner' method of handling it?

Barry

--

Barry Treahy, Jr * Midwest Microwave * Vice President & CIO
E-mail: suppressed * Phone: 480/314-1320 * FAX: 480/661-7028


_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.