Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

pyramids

Pioneers
  • Posts

    377
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jeff
  • Gender
    Male
  • Location
    Pennsylvania
  • Website

Recent Profile Visitors

11,978 profile views

pyramids's Achievements

  1. When I create an order using "Without Customer Account" the customers_id is zero in the orders table. Is this correct or do I need to fix it?
  2. Hack to input or edit the transaction details including the ID in admin/edit_orders.php This will work for those of you using Authorizenet AIM, which means your orders table will have a transaction_details column in the orders table Note: I use it to only add the transaction id for manually inputted orders. In admin/edit_orders.php FIND <tr> <td class="main"><?php echo ENTRY_CREDIT_CARD_EXPIRES; ?></td> <td class="main"><input name="update_info_cc_expires" size="4" value="<?php echo $order->info['cc_expires']; ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('cc_expires', encodeURIComponent(this.value))"<?php } ?>></td> </tr> PUT THIS JUST BELOW IT <?php //bof transaction details $detail_query = tep_db_query("SELECT transaction_details FROM " . TABLE_ORDERS . " WHERE orders_id = " . (int)$_GET['oID'] . " LIMIT 1"); $detail = tep_db_fetch_array($detail_query); if ($detail['transaction_details'] != '') { $details = explode(';', $detail['transaction_details']); foreach ($details as $d) { $item = explode('|', $d); ?> <tr> <td class="main"><?php echo $item[0]; ?>:</td> <td class="main"><?php echo $item[1]; ?></td> </tr> <?php } } ?> <tr> <td class="main"><?php echo ENTRY_TRANSACTION_DETAILS; ?></td> <td class="main"><textarea name="update_info_transaction_details" cols="30" rows="3" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('transaction_details', encodeURIComponent(this.value))"<?php } ?>><?php echo $detail['transaction_details']; ?></textarea> </td> </tr> <?php //eof transaction details ?> FIND 'cc_expires' => tep_db_prepare_input($_POST['update_info_cc_expires']), PUT THIS JUST BELOW IT 'transaction_details' => tep_db_prepare_input($_POST['update_info_transaction_details']), In languages/english/edit_orders.php add this to the bottom define('ENTRY_TRANSACTION_DETAILS', 'Transaction Details<br><font size="1" color="red">Transaction ID|123456789;</font>');
  3. I just uploaded a new version 2.0 that addresses this issue. I also added an editable box on the products listings page (in categories.php) so you can edit faster. http://addons.oscommerce.com/info/6335
  4. After some searching, the problem is due to you using 3 languages. The quick fix (for english) is below. In admin/categories.php remove this code: <tr> <td class="main"><?php echo TEXT_PRODUCTS_LOCATE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_locate', $pInfo->products_locate); ?></td></tr> <tr> ***FIND***: <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> ***ADD JUST BELOW IT *** but above the (<?php } ?>) *** this code: <!-- bof locate --> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_LOCATE; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php if ($i == 0) echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php if ($i == 0) echo tep_draw_input_field('products_locate[' . $languages[$i]['id'] . ']', (isset($products_locate[$languages[$i]['id']]) ? $products_locate[$languages[$i]['id']] : tep_get_location($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> <!-- eof locate -->
  5. The only thing I can think of is your code has been modified (not standard) and is is limiting the size of the data input for the new field products_locate.
  6. In the actual table in products_description is the location of "AAA-33" listed or is it shortened? You need to access the database directly.
  7. The first place to look is your table It may not have been setup with the needed space. I set it up as ALTER TABLE products_description ADD products_locate VARCHAR(30); That would give you 30 spaces. What does your table give to products_locate?
  8. Your packing slip has been modified, it appears you have an extra or missing HTML tag. The column issue is a HTML issue. Our updated code does not change the HTML code. On the issue of not showing the full text of the location, it appears that either your code is limiting the input (check your table to see if it is) or the code is limiting the output. This is something you will need to address since the code I supplied does not limit the text. Here is a copy of a working standard packingslip.php file. <?php /* $Id: packingslip.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> <!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> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'store_logo.png', STORE_NAME); ?></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo tep_draw_separator(); ?></td> </tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td class="main"><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <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> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { $product_query = tep_db_query("select products_locate from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $order->products[$i]['id'] . "'"); $info_product = tep_db_fetch_array($product_query); $hold_locate = ''; if ($info_product['products_locate']){$hold_locate = ' L(' . $info_product['products_locate'] . ')';} echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'] .' Products ID = '. $order->products[$i]['id']; if (sizeof($order->products[$i]['attributes']) > 0) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . ' order id='. (int)$oID . $hold_locate . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  9. It doesn't appear that you replaced the code. It also appears you added a column --> <td WIDTH="80" class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_LOCATION; ?></td>
  10. It looks like you are missing some code - According to the instructions: ####################################################### in admin/packingslip.php ####################################################### ***FIND***: <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (sizeof($order->products[$i]['attributes']) > 0) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> ***CHANGE TO***: <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { $product_query = tep_db_query("select products_locate from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $order->products[$i]['id'] . "'"); $info_product = tep_db_fetch_array($product_query); $hold_locate = ''; if ($info_product['products_locate']){$hold_locate = ' L(' . $info_product['products_locate'] . ')';} echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (sizeof($order->products[$i]['attributes']) > 0) { for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . $hold_locate . '</td>' . "\n" . ' </tr>' . "\n"; } ?>
  11. Make An Offer 1.0 http://www.oscommerce.com/community/contributions,3034
  12. The product ID is not working... There appears to be an added edit needed: open admin/includes/classes/order.php find: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']); change to: $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']); Let me know if this solves it, Regards, Jeff
  13. It may be that there are no products ordered? This line looks for items ordered... for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { have you placed a test order and accessed the packingslip.php script? regards, Jeff
×
×
  • Create New...