Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Any assistance would be greatly appreciated. I'm attempting to add a checkbox to the create an account form that must be checked before the account can be established.

 

I've been trying for hours to get the form to validate if the box is checked, but I've had no success. Here is the code I have added to try to get this to work:

 

catalog/languages/english.php I added:

define('ENTRY_NEWSLETTER_ERROR', '');

// added code here

define('ENTRY_AGREEMENT', '');

define('ENTRY_AGREEMENT_ERROR', 'You must check the account agreement box to set up an accout.');

define('ENTRY_AGREEMENT_TEXT', '*');

// end of new code

define('ENTRY_PASSWORD', 'Password:');

 

catalog/languages/english/create_account.php I added:

$newsletter = false;

}

// added code here for account agreement

if (isset($HTTP_POST_VARS['agreement'])) {

} else {

$error = true;

$messageStack->add('create_account', ENTRY_AGREEMENT_ERROR);

}

// end of account agrrement code

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

 

and I added

</tr>

<!-- Added this for Account Agreement -->

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b>Account Agreement</b></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="2" cellpadding="2">

<tr>

<td class="main"><?php echo tep_draw_checkbox_field('agreement', '1') . '?' . (tep_not_null(ENTRY_AGREEMENT_TEXT) ? '<span class="inputRequirement">' . ENTRY_AGREEMENT_TEXT . '</span>': ''); ?> By clicking this box you are agreeing that any products your purchase using this account name are to be used for personal use only, and not resold to any other persons or organizations.</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<!-- End of Account Agreement addition -->

<tr>

 

 

I am a rookie at best at coding so I'm sure there are many places I may be making mistakes. I'm not sure where to look or what to change. Any ideas? Please.

 

Here is the site:

www.myhairoutlet.com/catalog

 

Thanks again for any suggestions!

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...