Jump to content

pocketGEAR.ca

Members
  • Content count

    28
  • Joined

  • Last visited

Profile Information

  • Real Name
    Tim Rhodes
  1. pocketGEAR.ca

    Low Stock Report v2.0

    Yea, now it's the file in your Language directory. Switch that file to UNIX as well, and your good. Worked for me.
  2. pocketGEAR.ca

    eBay Auction Sales Manager 1.0

    Good call.. looks like I have a PayPal IPN problem.. Sorry to doubt your master programming skills! <grin>... thanks for your troubleshooting anthony.
  3. pocketGEAR.ca

    eBay Auction Sales Manager 1.0

    I just had someone check out and the items were not deducted from the cart, I had 20 in stock, so it's not just 0 stock items... not sure what could be wrong though - products are all mapped correctly, not getting any errors anywhere... weird. any ideas?
  4. pocketGEAR.ca

    eBay Auction Sales Manager 1.0

    Anthony; I'm just waiting for some clients to check out before i give you the final verdict - products are mapped. I think what's happenening is it deducts from stock unless the product is at zero, then it will stay at zero as opposed to being -1, -2, etc... i'll let you know later today when my sales get checked out.
  5. pocketGEAR.ca

    eBay Auction Sales Manager 1.0

    Anthony, Products are definatly NOT being deducted from inventory when someone checks out. Have I installed something wront (or missed a peice?). Does this feature work for other users of EAM? Tim pocketGEAR.ca
  6. pocketGEAR.ca

    eBay Auction Sales Manager 1.0

    hey anthony - this may have already been covered in this thread.. but it seems as though when someone checks out, the store item that has been mapped isn't being deduced out of inventory... mabye it's just in my head! i'll have to keep a close eye...
  7. pocketGEAR.ca

    Batch Order Center Update 1.1

    Sure - the output to the .PDF doesn't look that difficult, i think it will just take time making changes, then seeing if it aligns, then making changes, then see if it aligns, then making ch.... you get the point <grin> I will definatly keep you updated if i get anywhere with this. Tim.
  8. pocketGEAR.ca

    Batch Order Center Update 1.1

    Hi - This is a great contribution. Here's my dilemma, and we'll see if anyone is able to help me out. I'm using a custom invoice.php right now & integrated labels, which is a sheet of paper with a mailing label built in, so that i just print the one sheet & ta da! Anyways, I need the .pdf output files to come out in the same layout as my invoice.php file, (or at least the address fields to match up exactly!) - as i have 2500 sheets of integrated labels sitting on my desk! i need to get this to work! <grin> That being said - i need some help with this. Is any kind soul willing to lend a hand? Here's a copy of my invoice.php. <?php /* $Id: invoice.php,v 1.4 2003/02/16 13:40:33 thomasamoulton Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 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 = '" . tep_db_input($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>pocketGEAR.ca Invoice: Order <?php echo $oID; ?></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> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '150'); ?></td> <!-- shipping label //--> <td valign="top"> <table border="0" width="300" cellspacing="0" cellpadding="2"> <tr><td class="smallText"> </td></tr> <tr><td class="main"><br><?php echo nl2br(STORE_NAME_ADDRESS); ?></td></tr> <tr><td colspan="2"><img src="images/dash.gif" border="0"></td></tr> <tr><td class="main"><?php echo "<br><b>TO:<dl><dd>"; echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); echo "</dl>" ?></td></tr> <tr><td class="smallText" align="right"><br><br>Order Number: <?php echo $oID; ?></td></tr> </table> </td> <td><?php echo tep_draw_separator('pixel_trans.gif', '50', '1'); ?></td> <!-- return label //--> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '150'); ?></td> <td valign="top"> <table border="0" width="300" cellspacing="0" cellpadding="2"> <tr><td class="smallText"> </td></tr> <tr><td class="main"><?php echo "<br>"; echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td></tr> <tr><td colspan="2"><img src="images/dash.gif" border="0"></td></tr> <tr><td class="main"><br><b>TO:<dl><dd><?php echo nl2br(STORE_NAME_ADDRESS); ?></dl></td></tr> <tr><td class="smallText" align="right"><br><br>Order Number: <?php echo $oID; ?></td></tr> </table> </td> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '150'); ?></td> </tr> <tr><td class="smallText" colspan="5"> <br><br><i>For your convenience, we've provided a return label in the event you are not satisfied with our product. Please see our shipping and returns policy by visiting <u>http://pocketgear.ca/catalog/shipping.php</u></i><br></td></tr> </table> </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 class="pageHeading">Order Number: <?php echo $oID; ?></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->customer, 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> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?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 ( ($k = sizeof($order->products[$i]['attributes'])) > 0) { for ($j = 0; $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> <tr><table border="0" width="500" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"><td colspan="3" class="dataTableHeadingContent"><b>Order Comments</td></tr> <?php $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); if (tep_db_num_rows($orders_history_query)) { while ($orders_history = tep_db_fetch_array($orders_history_query)) { echo ' <tr valign=\"top\">' . "\n" . ' <td class="smallText" align="left" width="140">' . tep_datetime_short($orders_history['date_added']) . '</td>' . "\n" . ' <td class="smallText">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td>' . "\n" . ' </tr>' . "\n"; } } ?> </table> </tr> </table></td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> And just in case you don't have it on you, here's the Batch_Print.php file. <?php require('includes/application_top.php'); if ($HTTP_GET_VARS['mkey']) { $key = $HTTP_GET_VARS['mkey']; $message = $error[$key]; $HTTP_GET_VARS['act'] = 0; } if ($HTTP_GET_VARS['act'] == '') { $HTTP_GET_VARS['act'] = 0; } if (strlen($HTTP_GET_VARS['act']) == 1 && is_numeric($HTTP_GET_VARS['act'])) { switch ($HTTP_GET_VARS['act']) { case 1: // CHECK DATE ENTERED, GRAB ALL ORDERS FROM THAT DATE, AND CREATE PDF FOR ORDERS if (!isset($HTTP_POST_VARS['startdate'])) { message_handler(); } if ((strlen($HTTP_POST_VARS['startdate']) != 10) || verify_date($HTTP_POST_VARS['startdate'])) { message_handler('ERROR_BAD_DATE'); } if (!is_writeable(BATCH_PDF_DIR)) { message_handler('SET_PERMISSIONS'); } $time0 = time(); $startdate = tep_db_prepare_input($HTTP_POST_VARS['startdate']); if (!isset($HTTP_POST_VARS['enddate'])) { message_handler(); } if ((strlen($HTTP_POST_VARS['enddate']) != 10) || verify_date($HTTP_POST_VARS['enddate'])) { message_handler('ERROR_BAD_DATE'); } if (!is_writeable(BATCH_PDF_DIR)) { message_handler('SET_PERMISSIONS'); } $time0 = time(); $enddate = tep_db_prepare_input($HTTP_POST_VARS['enddate']); require(DIR_WS_CLASSES . 'currencies.php'); require(BATCH_PRINT_INC . 'class.ezpdf.php'); require(DIR_WS_CLASSES . 'order.php'); $pdf = new Cezpdf(PAGE); $currencies = new currencies(); $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm'); $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm'); if ($HTTP_POST_VARS['show_comments']) { $get_customer_comments = ' and h.orders_status_id = ' . DEFAULT_ORDERS_STATUS_ID; } if ($HTTP_POST_VARS['pull_status']){ $pull_w_status = " and o.orders_status = ". $HTTP_POST_VARS['pull_status']; } $orders_query = tep_db_query("select o.orders_id,h.comments,MIN(h.date_added) from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS_HISTORY . " h where o.date_purchased between '" . tep_db_input($startdate) . "' and '" . tep_db_input($enddate) . "23:59:59' and h.orders_id = o.orders_id" . $pull_w_status . $get_customer_comments . ' group by o.orders_id'); if (!tep_db_num_rows($orders_query) > 0) { message_handler('NO_ORDERS'); } $num = 0; while ($orders = tep_db_fetch_array($orders_query)) { $order = new order($orders['orders_id']); if ($num != 0) { $pdf->EzNewPage(); } $y = $pdf->ezText(STORE_NAME_ADDRESS,COMPANY_HEADER_FONT_SIZE); $y -= 10; $pdf->setLineStyle(1); $pdf->line(LEFT_MARGIN,$y,LINE_LENGTH,$y); $pdf->ezSetY($y); $dup_y = $y; $y = $pdf->ezText("<b>" . TEXT_ORDER_NUMBER . " </b>" . $orders['orders_id'] ."\n\n",SUB_HEADING_FONT_SIZE); if ($HTTP_POST_VARS['show_order_date']) { $pdf->ezSetY($dup_y); $pdf->ezText("<b>" . TEXT_ORDER_DATE . " </b>" . date(TEXT_ORDER_FORMAT, strtotime($order->info['date_purchased'])) ."\n\n",SUB_HEADING_FONT_SIZE,array('justification'=>'right')); } $pdf->addText(LEFT_MARGIN,$y,SUB_HEADING_FONT_SIZE,"<b>" . ENTRY_SOLD_TO . "</b>"); $pos = $y; $indent = LEFT_MARGIN + TEXT_BLOCK_INDENT; $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->billing['name']); if ($order->billing['company'] && $order->billing['company'] != 'NULL') { $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->billing['company']); } $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->billing['street_address']); if ($order->billing['suburb'] && $order->billing['suburb'] != 'NULL') { $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->billing['suburb']); } $cty_st_zip = $order->billing['city'] . " " . $order->billing['state'] . ", " . $order->billing['postcode']; $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$cty_st_zip); $pdf->addText(SHIP_TO_COLUMN_START,$y,SUB_HEADING_FONT_SIZE,"<b>" . ENTRY_SHIP_TO . "</b>"); $pos = $y; $indent = SHIP_TO_COLUMN_START + TEXT_BLOCK_INDENT; $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->delivery['name']); if ($order->delivery['company'] && $order->delivery['company'] != 'NULL') { $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->delivery['company']); } $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->delivery['street_address']); if ($order->delivery['suburb'] && $order->delivery['suburb'] != 'NULL') { $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$order->delivery['suburb']); } $cty_st_zip = $order->delivery['city'] . " " . $order->delivery['state'] . ", " . $order->delivery['postcode']; $pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,$cty_st_zip); if ($HTTP_POST_VARS['show_phone'] || $HTTP_POST_VARS['show_email'] ) { $pos -= SECTION_DIVIDER; $pdf->ezSetY($pos); if ($HTTP_POST_VARS['show_phone']) { $pos = $pdf->ezText("<b>" . ENTRY_PHONE . "</b> " . $order->customer['telephone'],GENERAL_FONT_SIZE); } if ($HTTP_POST_VARS['show_email']) { $pos = $pdf->ezText("<b>" . ENTRY_EMAIL . "</b> " .$order->customer['email_address'],GENERAL_FONT_SIZE); } } $pos -= SECTION_DIVIDER; $pdf->ezSetY($pos); if ($HTTP_POST_VARS['show_pay_method']) { $pos = $pdf->ezText("<b>" . ENTRY_PAYMENT_METHOD . "</b> " . $order->info['payment_method'],GENERAL_FONT_SIZE); if ($order->info['payment_method'] == PAYMENT_TYPE) { $pos = $pdf->ezText("<b>" . ENTRY_PAYMENT_TYPE . "</b> " . $order->info['cc_type'],GENERAL_FONT_SIZE); $pos = $pdf->ezText("<b>" . ENTRY_CC_OWNER . "</b> " . $order->info['cc_owner'],GENERAL_FONT_SIZE); if ($HTTP_POST_VARS['show_cc']) { $pos = $pdf->ezText("<b>" . ENTRY_CC_NUMBER . "</b> " . $order->info['cc_number'],GENERAL_FONT_SIZE); } $pos = $pdf->ezText("<b>" . ENTRY_CC_EXP . "</b> " . $order->info['cc_expires'],GENERAL_FONT_SIZE); } } $pos -= SECTION_DIVIDER; change_color(TABLE_HEADER_BKGD_COLOR); $pdf->filledRectangle(LEFT_MARGIN,$pos-PRODUCT_TABLE_ROW_HEIGHT,PRODUCT_TABLE_HEADER_WIDTH,PRODUCT_TABLE_ROW_HEIGHT); $x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN; $pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN; change_color(GENERAL_FONT_COLOR); $pdf->addText($x,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_PRODUCTS); $pdf->addText($x += PRODUCTS_COLUMN_SIZE,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_PRODUCTS_MODEL); $pdf->addText($x += MODEL_COLUMN_SIZE,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_TAX); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_PRICE_EXCLUDING_TAX); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_PRICE_INCLUDING_TAX); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_TOTAL_EXCLUDING_TAX); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,TABLE_HEADING_TOTAL_INCLUDING_TAX); $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; // Sort through the products for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { $prod_str = $order->products[$i]['qty'] . " x " . $order->products[$i]['name']; change_color(PRODUCT_LISTING_BKGD_COLOR); $pdf->filledRectangle(LEFT_MARGIN,$pos-PRODUCT_TABLE_ROW_HEIGHT,PRODUCT_TABLE_HEADER_WIDTH,PRODUCT_TABLE_ROW_HEIGHT); $x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN; $pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN; change_color(GENERAL_FONT_COLOR); $truncated_str = $pdf->addTextWrap($x,$pos,PRODUCTS_COLUMN_SIZE,TABLE_HEADER_FONT_SIZE,$prod_str); $pdf->addText($x += PRODUCTS_COLUMN_SIZE,$pos,TABLE_HEADER_FONT_SIZE,$order->products[$i]['model']); $pdf->addText($x += MODEL_COLUMN_SIZE,$pos,TABLE_HEADER_FONT_SIZE,$order->products[$i]['tax']); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value'])); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,$currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value'])); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])); $pdf->addText($x += PRICING_COLUMN_SIZES,$pos,TABLE_HEADER_FONT_SIZE,$currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])); $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; if ($truncated_str) { change_color(PRODUCT_LISTING_BKGD_COLOR); $pdf->filledRectangle(LEFT_MARGIN,$pos-PRODUCT_TABLE_ROW_HEIGHT,PRODUCT_TABLE_HEADER_WIDTH,PRODUCT_TABLE_ROW_HEIGHT); $pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN; change_color(GENERAL_FONT_COLOR); $reset_x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN; $pdf->addText($reset_x,$pos,TABLE_HEADER_FONT_SIZE,$truncated_str); $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; } if ( ($k = sizeof($order->products[$i]['attributes'])) > 0) { for ($j = 0; $j < $k; $j++) { $attrib_string = '<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') { $attrib_string .= ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; } $attrib_string .= '</i>'; change_color(PRODUCT_LISTING_BKGD_COLOR); $pdf->filledRectangle(LEFT_MARGIN,$pos-PRODUCT_TABLE_ROW_HEIGHT,PRODUCT_TABLE_HEADER_WIDTH,PRODUCT_TABLE_ROW_HEIGHT); $pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN; change_color(GENERAL_FONT_COLOR); $reset_x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN; if (PRODUCT_ATTRIBUTES_TEXT_WRAP) { $wrapped_str = $pdf->addTextWrap($reset_x,$pos,PRODUCTS_COLUMN_SIZE,PRODUCT_ATTRIBUTES_FONT_SIZE,$attrib_string); } else { $pdf->addText($reset_x,$pos,PRODUCT_ATTRIBUTES_FONT_SIZE,$attrib_string); } $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; if ($wrapped_str) { change_color(PRODUCT_LISTING_BKGD_COLOR); $pdf->filledRectangle(LEFT_MARGIN,$pos-PRODUCT_TABLE_ROW_HEIGHT,PRODUCT_TABLE_HEADER_WIDTH,PRODUCT_TABLE_ROW_HEIGHT); $pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN; change_color(GENERAL_FONT_COLOR); $pdf->addText($reset_x,$pos,PRODUCT_ATTRIBUTES_FONT_SIZE,$wrapped_str); $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; } } } } //EOFOR $pos -= PRODUCT_TABLE_BOTTOM_MARGIN; for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { $pdf->addText(LEFT_MARGIN + 200,$pos -= PRODUCT_TOTALS_LEADING,PRODUCT_TOTALS_FONT_SIZE,"<b>" . $order->totals[$i]['title'] . "</b>"); $pdf->addText($x,$pos,PRODUCT_TOTALS_FONT_SIZE,$order->totals[$i]['text']); } //EOFOR $pos -= SECTION_DIVIDER; if ($orders['comments']) { $pdf->ezSetY($pos); $pdf->ezText("<b>Comments:</b>\n" . $orders['comments'],GENERAL_FONT_SIZE); } if ($HTTP_POST_VARS['status'] && ($HTTP_POST_VARS['status'] != $order->info['orders_status'])){ $customer_notified = 0; $status = tep_db_prepare_input($HTTP_POST_VARS['status']); $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, BATCH_COMMENTS) . "\n\n"; if ($HTTP_POST_VARS['notify']) { $status_query = tep_db_query("select orders_status_name as name from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "' and orders_status_id = " . tep_db_input($status)); $status_name = tep_db_fetch_array($status_query); $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders['orders_id'] . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($order->info['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $status_name['name']); tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . $orders['orders_id'] . "'"); tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . $orders['orders_id'] . "', '" . tep_db_input($status) . "', now(), '" . $customer_notified . "', '" . $notify_comments . "')"); } $num++; // Send fake header to avoid timeout, got this trick from phpMyAdmin $time1 = time(); if ($time1 >= $time0 + 30) { $time0 = $time1; header('X-bpPing: Pong'); } }// EOWHILE $pdf_code = $pdf->output(); $fname = BATCH_PDF_DIR . BATCH_PDF_FILE; if ($fp = fopen($fname,'w')) { fwrite($fp,$pdf_code); fclose($fp); } else { message_handler('FAILED_TO_OPEN'); } $message = 'A PDF of ' . $num . ' order(s) was successful! <a href="'.$fname.'"><b>Click here</b></a> to download the order file.'; case 0: require(BATCH_PRINT_INC . 'batch_print_header.php'); require(BATCH_PRINT_INC . 'batch_print_body.php'); require(BATCH_PRINT_INC . 'batch_print_footer.php'); break; default: message_handler(); }//EOSWITCH } else { message_handler('ERROR_INVALID_INPUT'); } // FUNCTION AREA function message_handler($message=''){ if ($message) { header("Location: " . tep_href_link(BATCH_PRINT_FILE, 'mkey=' . $message)); } else { header("Location: " . tep_href_link(BATCH_PRINT_FILE)); } exit(0); } function change_color($color) { global $pdf; list($r,$g,$b) = explode(',', $color); $pdf->setColor($r,$g,$b); } function verify_date($startdate) { $error = 0; list($year,$month,$day) = explode('-', $startdate); if ((strlen($year) != 4) || !is_numeric($year)) { $error++; } if ((strlen($month) != 2) || !is_numeric($month)) { $error++; } if ((strlen($day) != 2) || !is_numeric($day)) { $error++; } return $error; } function verify_date($enddate) { $error = 0; list($year,$month,$day) = explode('-', $enddate); if ((strlen($year) != 4) || !is_numeric($year)) { $error++; } if ((strlen($month) != 2) || !is_numeric($month)) { $error++; } if ((strlen($day) != 2) || !is_numeric($day)) { $error++; } return $error; } ?> Any help would be greatly appreciated.
  9. pocketGEAR.ca

    [Contribution] Step-By-Step Manual Order

    Alright, this is what I did: (Backup, yo!) In filename Create_account_process, look for (near the bottom) and replace it with this: in file account_details.php (in admin/includes/modules), look for : around line 434. Add this right below it: and lastley, stick this at the bottom of your admin/includes/languages/english.php That's it. Your done! - This seemed to work for me. I had already changed the new account's password to "default" using another mod that was posted on here earlier. So now I can create a customers account, and checkout with them withouth them ever knowing. (this works great with the eBay Auction Manager Contrib.) - Anyways, i hope someone makes use of this! Tim pocketGEAR.ca
  10. pocketGEAR.ca

    [Contribution] Step-By-Step Manual Order

    Hey all, this is a great contribution - I'm looking to figure out how to make it do just one more thing. When I Create a user, I want a checkbox asking me if i want to send them the new user email - with their password and stuff.. I've had a couple of ebay customers who are adamant they don't want to create an account - but it just makes the process easier for me. So, i want to be able to create their account without them receiveing an email from me - I can't just put in my own email becuase osCommerce only allows an email to be registered once - hmm, mabye changing that would be easier than having a checkbox.... In any event, can anyone help me out with this?
  11. pocketGEAR.ca

    [Contribution] Down for Maintenance v1.0

    Trying to install 1.0 (or 1.1) on MS1, and already having an issue. In my 'includes/header.php' file, i cannot locate this line: // check session.auto_start is disabled I checked my original install, and still can't find it, so i don't think I have modified that file yet. Can anyone else point me in the right direction? Thanks. t.
  12. pocketGEAR.ca

    [Contribution] Down for Maintenance v1.0

    Trying to install 1.0 (or 1.1) on MS1, and already having an issue. In my 'includes/header.php' file, i cannot locate this line: // check session.auto_start is disabled I checked my original install, and still can't find it, so i don't think I have modified that file yet. Can anyone else point me in the right direction? Thanks. t.
×