Guest Posted May 26, 2006 Share Posted May 26, 2006 Can someone tell me what code to add to the packing slip to make the shipping method show up there like it does on the invoice (without the dollar amount)? Thanks. Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted May 26, 2006 Share Posted May 26, 2006 find this in line 30 admin/includes/classes/order.php $totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"); while ($totals = tep_db_fetch_array($totals_query)) { $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']); } $this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified']); change to $totals_query = tep_db_query("select title, text, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by sort_order"); while ($totals = tep_db_fetch_array($totals_query)) { $this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']); if ($totals['class'] == 'ot_shipping') { $shipping_method = substr($totals['title'], 0, strlen($totals['title'])-1); } } $this->info = array('currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'shipping_method' => $shipping_method, 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order['orders_status'], 'last_modified' => $order['last_modified']); in admin/packingslip.php find this (line 79) <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> add this right below it <?php if ($order->info['shipping_method'] != '') { ?> <tr> <td class="main"><b><?php echo ENTRY_SHIPPING_METHOD; ?></b></td> <td class="main"><?php echo $order->info['shipping_method']; ?></td> </tr> <?php } ?> in admin/includes/languages/your_language/packingslip.php add this (translate if not English) define('ENTRY_SHIPPING_METHOD', 'Shipping Method:'); enjoy! :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
rabbitseffort Posted May 26, 2006 Share Posted May 26, 2006 here is a cool contribution for a nicer looking invoice and packing slip you may want also...it adds some extra info also: HERE "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey" Link to comment Share on other sites More sharing options...
alexabbas Posted June 7, 2006 Share Posted June 7, 2006 This code change looks great but it doesn't work for me because my shipping method isn't getting stored in the orders_total table. The only class there is "ot_total", one per order. I saw a schema that had shipping_method in the orders table, but I don't have that either. I really need to be able to view the shipping method, and I'm afraid I'm not even storing it in the database when an order is submitted. Can anyone offer ideas about what's going on?!? Thanks Alex Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted June 8, 2006 Share Posted June 8, 2006 This code change looks great but it doesn't work for me because my shipping method isn't getting stored in the orders_total table. The only class there is "ot_total", one per order. I saw a schema that had shipping_method in the orders table, but I don't have that either. I really need to be able to view the shipping method, and I'm afraid I'm not even storing it in the database when an order is submitted. Can anyone offer ideas about what's going on?!? Thanks Alex if your ot_shipping is not stored in orders_totals table, you have not turned it on in the admin->modules->order totals section. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.