Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom Order Form


tiendollaz

Recommended Posts

Can someone help me out on making a Custom Order Form? i dont get how they did the Contact Us form but i would want something lik that.. but wit there Name/Street Address/email/phone number/Item #/size/Total Amount and have it emailed to me.. can someone help?

Link to comment
Share on other sites

What you are asking is not a quick fix. You will most likely need to pay someone to do it or dig into the code and change it yourself - asking questions here on particular problems. If you want to try it yourself, create a new page to test with and copy pieces of the code from other pages, like Contact Us, and build on that. It is not as difficult as it is time-consuming.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

this is wat i got.. the only thing wrong is it wont send an email

 

<?php
/*
 $Id: custom_order_form.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
Edited by tiendollaz
 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOM_ORDER_FORM);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
   $name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$address = tep_db_prepare_input($HTTP_POST_VARS['address']);
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$phone = tep_db_prepare_input($HTTP_POST_VARS['phone']);
$item = tep_db_prepare_input($HTTP_POST_VARS['item']);
$size = tep_db_prepare_input($HTTP_POST_VARS['size']);
$total = tep_db_prepare_input($HTTP_POST_VARS['total']);
   $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, $address, $phone, $item, $size, $total, $name, $email_address);

     tep_redirect(tep_href_link(FILENAME_CUSTOM_ORDER_FORM, 'action=success'));
   } else {
     $error = true;

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

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CUSTOM_ORDER_FORM));
?>
<!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>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top">
<?php echo tep_draw_form('CUSTOM_ORDER_FORM', tep_href_link(FILENAME_CUSTOM_ORDER_FORM, '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"></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 height="100" class="main" align="center"><?php echo 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><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" align="right"><?php echo ENTRY_NAME; ?> <?php echo tep_draw_input_field('name'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_ADDRESS; ?> <?php echo tep_draw_input_field('address'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_EMAIL; ?> <?php echo tep_draw_input_field('email'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_PHONE; ?> <?php echo tep_draw_input_field('phone'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_ITEM; ?> <?php echo tep_draw_input_field('item'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_SIZE; ?> <?php echo tep_draw_input_field('size'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_TOTAL; ?> <?php echo tep_draw_input_field('total'); ?></td>
             </tr>
             <tr>
               <td class="main" align="right"><?php echo ENTRY_ENQUIRY; ?></td>
             </tr>
             <tr>
               <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 10); ?></td>
             </tr>
    <font color="#990000">*</font>All fields are required
           </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 //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...