Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding field to Order Process email w/ checkout_process.php


lelandmyrick

Recommended Posts

I have a shop selling video games for the three major platforms, PlayStation, GameCube, and Xbox. I've added a field to the products table called products_platform and set it up on the admin page so I can enter the platform when adding a new product.

 

Here's my problem:

I'm trying to get the products_platform field to print out on the Order Process email along with the rest of the product info that is generated through 'checkout_process.php'.

 

I've found two places in the code I think I'll need to changed from checkout_process.php:

 

$sql_data_array = array('orders_id' => $insert_id,  

                           'products_id' => tep_get_prid($order->products[$i]['id']),  

                           'products_model' => $order->products[$i]['model'],  

                           'products_name' => $order->products[$i]['name'],  

                           'products_price' => $order->products[$i]['price'],  

                           'final_price' => $order->products[$i]['final_price'],  

                           'products_tax' => $order->products[$i]['tax'],  

                           'products_quantity' => $order->products[$i]['qty']);

   tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

 

and here:

 

$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";

 

But if I'm right, this data is being pulled from the 'orders_products' table, which means I'll also have to do some additional messing around with the order process to get the platform added to the 'orders_products' table.

 

Am I on the right track here, or is there something else I'm leaving out that I need in order to accomplish this task?

 

-leland-

Leland Myrick

Link to comment
Share on other sites

Second Question: what file do I need to modify to add the platform to the orders_products table along with the other info that is stored there? I looked at checkout_process.php but didn't see it there.

Leland Myrick

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...