This is a discussion on Add new field to product table within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi, I've added a new field to the products table "products_bin". This is very similar to the "products_model" field. I ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I've added a new field to the products table "products_bin". This is very similar to the "products_model" field. I need it to appear on the e-mail confirmation. Can anyone help me? Looking at the checkout_process.php file, I've found the following line of code that creates the lines in the e-mail with the product details, so I've added the text in red: $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['bin'] . '/' . $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've also gone to the 'order.php' class file (includes\classes) and edited it so that every time there was an instance of "model", I added "bin". I've also added a field in the orders_products table named 'products_bin'. Anyone can help? Pleeease?? thanks in advance, A.- |
|
#2
| |||
| |||
| I couldn't get it to work "the right way", so I cheated and did the following: Filename: checkout_process.php Lines: around 288 **new code in red ** //request bin code $bins = tep_db_query("select products_bin from products where products_model='" . $order->products[$i]['model'] . "'"); $bins_values = tep_db_fetch_array($bins); $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] .' (' . $bins_values['products_bin'] . '/' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; If anyone has got a nicer way of doing this, please let me know. don't want to have to run additional queries for each product ordered... A.- |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need to add input text field in product attributes | bethphilbin | osCommerce 2.2 Modification Help | 15 | 08-07-2006 07:48 PM |
| text field product option | esferguson | osCMax v1.7 General Mods Discussion | 30 | 06-10-2006 08:58 AM |
| How to change character limit in product name field | spiros71 | osCMax v2 Features Discussion | 1 | 06-08-2006 07:39 AM |
| HTML editor above product description field disapeared | winkscustoms | osCMax v1.7 Discussion | 5 | 06-17-2005 07:36 PM |
| Add new fields/table to product table | Anonymous | osCommerce 2.2 Modification Help | 0 | 10-21-2002 04:23 AM |