Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding products_date_available to checkout_process


david78

Recommended Posts

hello all,

 

i want customers to have the opportunity to checkout even when some products are not available.

therefore i added the products availability info to 'checkout_confirmation.php' for products which aren't available (works fine):

 

  $product_info_query = tep_db_query("select products_date_available from " . TABLE_PRODUCTS . " where products_id ='" .$order->products[$i]['id']."'");
 $product_info = tep_db_fetch_array($product_info_query);

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

    <br><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_short($product_info['products_date_available'])); ?>

<?php

  }

 

now i've tried to add the availability info to 'checkout_confirmation.php':

after

 

    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

i added

 

   $product_info_query = tep_db_query("select products_date_available from " . TABLE_PRODUCTS . " where products_id ='" . tep_get_prid($order->products[$i]['id']) . "'");
  $product_info = tep_db_fetch_array($product_info_query);

  if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

     $products_ordered .= "\n" . sprintf(TEXT_DATE_AVAILABLE, tep_date_short($product_info['products_date_available']));
  }

 

unfortunately the availability status doesn't appear in the order mail.

 

anyone out there who has an idea or updated this already?

thanks in advance for your help! :thumbsup:

 

david

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...