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

Re: [ic] Required Field


At 17:10 10/08/2005, you wrote:
Anyone have any ideas on why my value is not being required upon checkout?
Here is what I have done:

File Changed: profiles.order
Line Added:
    termsagree=required

File Changed: checkout.html
Lines Added:
    [error name=termsagree std_label="I agree to the terms and condtions."
required=1]
    <input type=checkbox name=termsagree value=1 [checked termsagree 1]>
    [value name=termsagree set='']

Thanks for looking.
Brian


Hi Brian,

Silly question probably, but did you edit the right part of profiles.order?

When I needed to add two required fields to my checkout page, one for Ts&C and one for the card's CVV, I added them both under the "credit_card" profile/section as that's what seemed to work for me. We only offer credit/debit card as payment method (hence why i stopped there), but I can see that for anyone wanting to take other methods this probably wouldn't work and more lines added to each relevant profile.

I've put my full credit_card profile and related code from the checkout page below for you:

__NAME__                            credit_card
fname=required
lname=required
address1=required
city=required
country=required
[if value country =~ /^(US|CA)$/i]
        state=state_province
        zip=postcode
[/if]
&or phone_night=phone, phone_day=phone Must have day or evening phone number

mv_credit_card_security_code=required Please enter your card security code
mv_accepted_terms=required Please agree to the Eros Shop Terms and Conditions

&fatal = yes
email=required
email=email

&set = mv_payment Incomplete

[if variable MV_PAYMENT_MODE]
&credit_card=standard keep __CREDIT_CARDS_ACCEPTED__
&charge=[var MV_PAYMENT_MODE][cgi mv_payment_test]
&set=mv_payment Real-time Credit Card (%c -- [var MV_PAYMENT_MODE])
[else]
&credit_card=standard __CREDIT_CARDS_ACCEPTED__
&set=mv_payment Credit Card (%c)
[/else]
[/if]

&calc = $Values->{mv_payment} =~ s/\%c/$Values->{mv_credit_card_type}/g; 1;
&final = yes
&setcheck=mv_email [value email]

__END__


Basic HTML code from /ord/checkout.html:


[error name=mv_credit_card_security_code std_label="Security Code" required=1]:&nbsp;
<input type=text name="mv_credit_card_security_code" size="3" maxlength="4">

[error name=mv_accepted_terms std_label="Terms and Conditions" required=1]
I agree to the Eros Shop <a href="[area terms]" target="_blank">Terms & Conditions</a>&nbsp; <input align="absmiddle" type="checkbox" name="mv_accepted_terms" value="1" [if value mv_accepted_terms]CHECKED[/if]><BR>
<small>(prevents you from continuing if not ticked)</small>

One final thought and I'm not sure if you need to do this, did you restart interchange and close all your browser windows (which my be caching the page/session)?

I find when IC starts doing odd things, it's normal my browser. A quick kill on all browser windows and starting afresh seems to get things working again in most cases.

Hope it works out :)

Mark



Eros Shop
vwe internet ltd
PO BOX 1067
SLOUGH
SL1 7YA
UK

Shop - http://www.eros-shop.co.uk
EMail - suppressed
Tel - 0870 284 3369
Fax - 0870 284 4469


_______________________________________________
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.