Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need to add form to os2.2


Guest

Recommended Posts

Hi

 

I am wanting to put a page into our site similar to the left hand side of http://www.educationalexperience.co.nz/sylvanian-club.php

 

Just wondering if anyone knows of an addon that could possably be changed or even an addon that does this. I have had a pretty good look, but so far unable to find.

 

Any helpful suggestions would be appreciated.

 

Many thanks

 

Grandpa

Link to comment
Share on other sites

Hi

Thanks for that.

 

I have altered both cont.php file buyt get this warning.

 

Warning: require(includes/languages/english/FILENAME_SYCLUB) [function.require]: failed to open stream: No such file or directory in /home/grandpas/public_html/syclub.php on line 15

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/FILENAME_SYCLUB' (include_path='.:/usr/lib/php') in /home/grandpas/public_html/syclub.php on line 15

 

Following is the code for the file reffered to above. Nay help would be greatly apprecioated.

 

<?php

/*

$Id: syclub.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SYCLUB); (This is line 15 )

 

$error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {

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

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);

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

 

if (tep_validate_email($email_address)) {

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

 

tep_redirect(tep_href_link(FILENAME_SYCLUB, 'action=success'));

} else {

$error = true;

 

$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);

}

}

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SYCLUB));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

 

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

<!-- body_text //-->

<td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<?php

if ($messageStack->size('contact') > 0) {

?>

<tr>

<td><?php echo $messageStack->output('contact'); ?></td>

</tr>

<tr>

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

</tr>

<?php

}

 

 

 

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {

?>

<tr>

<td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>

</tr>

<tr>

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

</tr>

<tr>

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

<tr class="infoBoxContents">

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

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

} else {

?>

<tr>

<td>

 

 

 

<!-- ** CONTACT PAGE TEXT BELOW ** -->

<p class="main">

<b>Telephone, Fax and Cell:</b><br />

 

 

 

<b>Email us below</b></p>

<!-- ** END OF CONTACT PAGE TEXT ** -->

 

 

 

 

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

<tr class="infoBoxContents">

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

<tr>

<td class="main"><?php echo ENTRY_NAME; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('name'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_EMAIL; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('email'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<tr>

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

<tr class="infoBoxContents">

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

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

}

?>

</table></form></td>

<!-- body_text_eof //-->

 

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

Many thanks

Link to comment
Share on other sites

Creating a new file include following actions

 

1) Make a copy of an existing file (eg of contact_us.php) and name it eg new_file.php - This you did so far

 

2) Do the same for the corresponding language file, so you should have a file in includes/languages/english/new_file.php - This is the second error you get

 

3) Define that file in file includes/filenames.php , in the same way it is done for all other files - This is the first error you get

 

So, just 2 more steps to do :)

Link to comment
Share on other sites

Hi

 

I have done as follows, but still get the warning as per my post #3, I have also included below the code for syclub.php this is in addition to the one in post #3

 

 

 

1.) catalog/includes/filenames.php file and insert:

 

define('FILENAME_SYCLUB', 'syclub.php');

 

placed it before the ?>

 

2.) catalog/includes/languages/english.php

 

added

define('BOX_INFORMATION_SYCLUB', 'syclub');

 

3.) catalog/includes/languages/english folder and

placed the syclub.php file.

 

catalog/includes placed syclub.php

 

4.) catalog/includes/boxes/information.php file

 

'' . BOX_INFORMATION_SYCLUB . '');

 

I have uploaded the "new" syclub.php file to their correct locations.

 

However I still get;

 

Warning: require(includes/languages/english/FILENAME_SYCLUB) [function.require]: failed to open stream: No such file or directory in /home/grandpas/public_html/syclub.php on line 15

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/FILENAME_SYCLUB' (include_path='.:/usr/lib/php') in /home/grandpas/public_html/syclub.php on line 15

 

Any suggestions would be appreciated.

 

Cheers

 

Grandpa

Link to comment
Share on other sites

Hi

 

I'll try again to upload.

 

<?php

/*

$Id: syclub.php,v 1.7 2002/11/19 01:48:08 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

 

define('HEADING_TITLE', 'Join');

define('NAVBAR_TITLE', 'Join');

 

define('TEXT_SUCCESS', 'Thank you for your inquiry,it has been successfully sent.');

define('EMAIL_SUBJECT', 'Enquiry from ' . STORE_NAME);

 

define('ENTRY_NAME', 'Your Name:');

define('ENTRY_EMAIL', 'E-Mail Address:');

define('ENTRY_ENQUIRY', 'Enquiry:');

 

 

?>

Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

Fixed the problem Found a good contribution called Wholesale_Inquiries V2.1.1

 

With a few minor mods, it works fine,

 

Many thanks for your help

 

Kind regards

 

Grandpa

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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