Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linda's Product Offer Price


Sharon123

Recommended Posts

Hi Everyone

 

I have installed Linda's Product Offer Price and all seems to work fine but, once you have clicked on "Offer Price" it goes to the offer_price_submit.php page, but no infomation is carried over to the page e.g. Product id or product model.

 

Here is the offer_price_submit.php page:

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License

 WebMakers.com Added: Product Offer Price
 Created By: Linda McGrath - osCOMMERCE@WebMakers.com
 http://www.thewebmakerscorner.com

 /catalog/offer_price_submit.php

*/

 require('includes/application_top.php');
   if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . 'offer_price_submit.php');

 $error = false;
 $error_offer = false;
 if ($HTTP_GET_VARS['action'] == 'send') {
   if ( tep_validate_email(trim($HTTP_POST_VARS['email'])) and tep_validate_offer_price(trim($HTTP_POST_VARS['offer'])) ) {

   $my_special_price= tep_get_products_special_price($the_offer_id);
   $my_price= tep_get_my_products_price();
   if ($new_price = tep_get_products_special_price($the_offer_id)) {
     $products_price = '<s>' . $currencies->display_price($my_price, '') . '</s> <span class="productSpecialPrice">' . ' Special ' . $currencies->display_price($my_special_price, '') . '</span>';
   } else {
     $products_price = $currencies->display_price($my_price, '');
   }

// SEND TO STORE
     tep_mail(STORE_OWNER, OFFER_PRICE_EMAIL_TO,
     OFFER_PRICE_SUBJECT . ' ID#' . $the_offer_id,
     'Vehicle ID:  ' . $the_offer_id . "\n" .
     'Vehicle Name:' . tep_get_products_name($the_offer_id) . "\n\n" .
     'From:  ' . $HTTP_POST_VARS['name'] . "\n" .
     'Email: ' . $HTTP_POST_VARS['email'] . "\n" .
     'Tendered Price: ' . $currencies->display_price(tep_clean_offer_price($HTTP_POST_VARS['offer']),'') . "\n\n" .
     'Comments:' . "\n" . $HTTP_POST_VARS['enquiry'],
     $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email'], '');

// SEND COPY TO CUSTOMER
     tep_mail($HTTP_POST_VARS['name'], $HTTP_POST_VARS['email'], OFFER_PRICE_SUBJECT . ' ID# ' . $the_offer_id,
     'Vehicle ID#   ' . $the_offer_id . "\n" .
     'Vehicle Name: ' . tep_get_products_name($the_offer_id) . "\n\n" .
     'From:  ' . $HTTP_POST_VARS['name'] . "\n" .
     'Email: ' . $HTTP_POST_VARS['email'] . "\n" .
     'Tendered Price: ' . $currencies->display_price(tep_clean_offer_price($HTTP_POST_VARS['offer']),'') .  "\n\n" .
     'Comments:' . "\n" . $HTTP_POST_VARS['enquiry'],
     STORE_OWNER, OFFER_PRICE_EMAIL_TO, '');

     tep_redirect(tep_href_link(FILENAME_OFFER_PRICE_SUBMIT, 'action=success', 'NONSSL'));
   } else {
     if ( !tep_validate_email(trim($HTTP_POST_VARS['email'])) ) {
       $error = true;
     }
     if ( !tep_validate_offer_price(trim($HTTP_POST_VARS['offer'])) ) {
       $error_offer = true;
     }
   }
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_OFFER_PRICE_SUBMIT));
?>
<!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 (getenv('HTTPS') == 'on' ? 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"><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>
<tr>
 <td class="main">
   <?php
     $the_offers_name=tep_get_products_name($the_offer_id);
     echo OFFER_PRODUCT_NAME . $the_offers_name . '<br>';
     echo OFFER_PRODUCT_ID . $the_offer_id;
   ?>
 </td>
</tr>
<?php
$my_special_price= tep_get_products_special_price($the_offer_id);
$my_price= tep_get_my_products_price();
   if ($new_price = tep_get_products_special_price($the_offer_id)) {
     $products_price = '<s>' . $currencies->display_price($my_price, '') . '</s> <span class="productSpecialPrice">' . $currencies->display_price($my_special_price, '') . '</span>';
   } else {
     $products_price = $currencies->display_price($my_price, '');
   }
?>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($HTTP_GET_VARS['action'] == 'success') {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><?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 align="right"><br><a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td>
         </tr>
       </table></td>
     </tr>
<?php
   tep_session_unregister('the_offer_id');
 } else {
?>
     <tr>
       <td><form action="<?php echo tep_href_link(FILENAME_OFFER_PRICE_SUBMIT, 'action=send', 'NONSSL'); ?>" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><?php echo ENTRY_NAME; ?><br><?php echo tep_draw_input_field('name', ($error ? $HTTP_POST_VARS['name'] : $first_name)); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo ENTRY_EMAIL; ?><br><?php echo tep_draw_input_field('email', ($error ? $HTTP_POST_VARS['email'] : $email_address)); if ($error) echo ENTRY_EMAIL_ADDRESS_CHECK_ERROR; ?></td>
         </tr>
         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo OFFER_REGULAR_PRICE . $products_price; ?><br><?php echo YOUR_OFFER_PRICE; ?><br><?php echo tep_draw_input_field('offer', ($error_offer ? $HTTP_POST_VARS['offer'] : $offer_amount)); if ($error_offer) echo ENTRY_OFFER_AMOUNT_ERROR; ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
         </tr>
         <tr>
           <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, $HTTP_POST_VARS['enquiry']); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, $get_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
           <td class="main" align="right"><br><?php echo tep_image_submit('button_send_email.gif', IMAGE_BUTTON_SEND_EMAIL); ?></td>
         </tr>
       </table></form></td>
     </tr>
<?php
 }
?>
   </table></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'); ?>

 

I do hope someone can help!!

 

Thnaks

Sharon

I know more than I did yesterday...If thats any help!

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