Jump to content

staceyd

Members
  • Content count

    45
  • Joined

  • Last visited

Profile Information

  • Real Name
    Stacey Dyer

Recent Profile Visitors

3,254 profile views
  1. Hi, I'm using print sticky labels from here: http://www.oscommerce.com/community/contri...5/search,labels I don't want it to print the suburb on the address labels, but don't want to turn it off from the admin, because I want it on everything else. Does anyone know how to do this? I REALLY appreciate your help!!!! Thanks, Stacey <? if (!$message) { ?> <? $order_statuses = array(); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'"); $orders_statuses[] = array('id' => 0, 'text' => 'None'); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'],'text' => $orders_status['orders_status_name']); } ?> <tr> <?php echo tep_draw_form('batch', FILENAME_LABEL_PRINT, 'act=1'); ?> <td> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr class="dataTableRowSelected"> <td class="dataTableContent" width="50%">Please enter the Order ID of the first Label you want to be displayed in the PDF:<br></td> <td width="50%" class="dataTableContent">Order ID:<?php echo tep_draw_input_field('startid'); ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent">Use Billing Address or Delivery Address?</td> <td width="25%" class="dataTableContent">Delivery: <?php echo tep_draw_selection_field('address', 'radio', "delivery", true); ?> Billing: <?php echo tep_draw_selection_field('address', 'radio', "billing", false); ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent">Only include orders with the status:<br>(if none, all orders will be included)</td> <td width="50%"><?php echo tep_draw_pull_down_menu('pull_status', $orders_statuses, 0); ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent">Position to Start printing from:<br>(0 position is top left label, they increase from left to right then from top to bottom)</td> <td width="50%" class="dataTableContent">Start Position:<?php echo tep_draw_input_field('startpos', '0'); ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent">Number of Labels to Print</td> <td width="50%" class="dataTableContent">Number:<?php echo tep_draw_input_field('endpos', NUM_LABELS_PER_PAGE); ?></td> </tr> <tr> <td align="right" colspan="2"><?php echo tep_image_submit('button_send.gif', 'Create'); ?></td> </tr> </table> </td> </form> </tr> <? } else { ?> <tr> <td> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr class="dataTableRowSelected"> <td class="dataTableContent" width="50%"><b>Program Message:</b></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo $message; ?></td> </tr> </table> <? } ?>
  2. Thanks for your reply. I just wonder if it's bumping up against one or more of the other contributions I installed... Thanks again! Stacey
  3. Hi, I've installed the Print Label contrib from here: http://www.oscommerce.com/community/contri...ll/search,label, but can't get it to start in different positions like it's supposed to do. For example, if you want to print a label, but have already used 5 labels on the sheet, then you input in the box (which is there on the admin page) to start printing on position 6. There is a place on this script below that is commented out and is about startpos - does that have something to do with it? Otherwise, it works great. Please help if you can. Thanks!! Stacey <?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: require(DIR_WS_CLASSES . 'currencies.php'); require(LABEL_PRINT_INC . 'class.ezpdf.php'); require(DIR_WS_CLASSES . 'order.php'); $pdf = new Cezpdf(array(PAGE_WIDTH, PAGE_HEIGHT)); $currencies = new currencies(); $pdf->selectFont(LABEL_PDF_DIR . 'Helvetica.afm'); $pdf->setFontFamily(LABEL_PDF_DIR . 'Helvetica.afm'); if ($HTTP_POST_VARS['pull_status']){ $pull_w_status = " and o.orders_status = ". $HTTP_POST_VARS['pull_status']; } if ($HTTP_POST_VARS['startpos']){ $startpos = $HTTP_POST_VARS['startpos']; } else { $startpos = 0; } if ($HTTP_POST_VARS['address']){ if ($HTTP_POST_VARS['address'] == "billing") $billing = true; else $billing = false; } else { $billing = false; } $orders_query = tep_db_query("select o.orders_id from " . TABLE_ORDERS . " o where o.orders_id >= '" . tep_db_input($startid) . "'" . $pull_w_status . " ORDER BY o.orders_id ASC"); $number_of_orders = tep_db_num_rows($orders_query); if ($HTTP_POST_VARS['endpos']){ $endpos = $HTTP_POST_VARS['endpos']; } else { $endpos = $number_of_orders; } //$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 ($number_of_orders <= 0) { message_handler('NO_ORDERS'); } $number_of_pages = ceil( $number_of_orders / NUM_LABELS_PER_PAGE ); change_color(GENERAL_FONT_COLOR); $start = ( $pdf->ez['pageHeight'] - STARTY ) * $number_of_pages;; $end = LABEL_HEIGHT - STARTY; /** * Code added to print on multiple pages * Removed LIMIT clause from SQL statement * Wrote new loop to print labels * @author Paul Harman */ // Check if a different start column has been requested if($startpos != 0) { $columns = $startpos; } // Iterate over the order count and find label positions for( $a = 0; $a < $number_of_orders; $a++ ) { // Set Y position for this label $label_y = LABEL_HEIGHT * $rows; if( $num == 0 ) { $label_y += STARTY; } // Iterate over the number of columns for( $b = 0; $b < NUM_COLUMNS; $b++ ) { // Set X position for this label $label_x = STARTX + LABEL_WIDTH * $columns; ++$columns; // Decide whether to start a new PDF page if( $label_y + LABEL_HEIGHT > $pdf->ez['pageHeight'] ) { // echo $label_y . " " . LABEL_HEIGHT . " " . $pdf->ez['pageHeight'] . "<br>"; $pdf->ezNewPage(); // We need to reset the Y coordinate for the new page $label_y = STARTY; // And reset the row counter; $rows = 0; } // Check if we have reached the limit of labels if($num >= $endpos) { break(2); } ++$num; // Send coordinates to label printing function print_address($label_x, $pdf->ez['pageHeight'] - $label_y); } // Send fake header to avoid timeout, got this trick from phpMyAdmin $time1 = time(); if ($time1 >= $time0 + 30) { $time0 = $time1; header('X-bpPing: Pong'); } // Reset the column counter $columns = 0; // Increment the rows counter ++$rows; } /*for($y = $start; $y > $end; $y -= LABEL_HEIGHT) { //if ($num != 0) { $pdf->EzNewPage(); } //$y = $pdf->ezText(STORE_NAME_ADDRESS,COMPANY_HEADER_FONT_SIZE); //$y -= 10; for ($x = STARTX; $x < STARTX + NUM_COLUMNS * LABEL_WIDTH; $x += LABEL_WIDTH) { if ($startpos <= $pos && $num < $endpos) { if (print_address($x, $y)) { $num++; } } $pos++; } //$y = $pdf->ezText(next_address(),GENERAL_FONT_SIZE); }// EOWHILE */ //$pdf->addText($indent,$pos -= GENERAL_LEADING,GENERAL_FONT_SIZE,"HELLO"); $pdf_code = $pdf->output(); $fname = LABEL_PDF_DIR . LABEL_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(LABEL_PRINT_INC . 'label_print_header.php'); require(LABEL_PRINT_INC . 'label_print_body.php'); require(LABEL_PRINT_INC . 'label_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(LABEL_PRINT_FILE, 'mkey=' . $message)); } else { header("Location: " . tep_href_link(LABEL_PRINT_FILE)); } exit(0); } function change_color($color) { global $pdf; list($r,$g,$b) = explode(',', $color); $pdf->setColor($r,$g,$b); } function print_address($x, $y) { global $pdf, $num, $billing, $orders_query; $pos = $y - CUST_ADD_OFFSET; if ($orders = tep_db_fetch_array($orders_query)) { $order = new order($orders['orders_id']); if ($billing == true) { $addressparts = explode("\n", strtoupper(tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n"))); } else { $addressparts = explode("\n", strtoupper(tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n"))); } foreach($addressparts as $addresspart) { $fontsize = GENERAL_FONT_SIZE; while ($pdf->getTextWidth($fontsize, $addresspart) > LABEL_WIDTH - COLUMN_GAP) { $fontsize--; } //$addresspart = preg_replace("%,[[:space:]]*$%", "", $addresspart); $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,$addresspart); } $store1 = STORE1; $store2 = STORE2; $store3 = STORE3; $store4 = STORE4; $pdf->addText($x,$y - STOREOFFSET1,"8","$store1"); $pdf->addText($x,$y - STOREOFFSET2,"8","$store2"); $pdf->addText($x,$y - STOREOFFSET3,"8","$store3"); $pdf->addText($x,$y - STOREOFFSET4,"8","$store4"); $pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET,$y + ORDERIDYOFFSET,ORDERIDFONTSIZE,$orders['orders_id']); } else { return false; } return true; } 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; } ?>
  4. Hi, I've just about got this whole thing set up and everything works with PayPal Payments Pro, but have had the problem that if the credit card has expired or is incorrect, no error message is given, but the page just refreshes. However, if the CC number is wrong, a warning window pops up, as it should. What file would I even look in to find and correct this? Can anyone help me figure out why this doesn't work? I'd really appreciate it! thanks, Stacey
  5. staceyd

    AttributesWizzard

    Me again... Okay - when I added the answer from post #48 That fixed everything.
  6. staceyd

    AttributesWizzard

    Actually, it has to do with the sort function that we added to the products_info.php page. When I delete (int)$languages_id . "'"); then the dropdown shows up (with no sorting of attributes, of course.) Is there a way to fix this? Thanks again! Stacey P.S. this post adds to my last post that comes right before this one.
  7. staceyd

    AttributesWizzard

    This is an excellent contribution - well, I think it will be. I can't get the drop-downs (or any other way of selecting the attributes) on the product pages, either. Did you ever figure this out? The attributes/lists add into the admin interface just great. Thanks for any help or advice you can give me!! Stacey
  8. staceyd

    [Contribution] POP-UPs MASSAGEed

    Thanks! I guess I'll do them by hand, then. That'll work. I appreciate your help. :)
  9. staceyd

    [Contribution] POP-UPs MASSAGEed

    Thanks so much for your quick reply! I really appreciate it. The pop-ups look great (they are all jpgs, by the way) - and are high enough quality. Do you know how I would change the quality of just the thumbnails? Can I just go somewhere and manually replace them? (they're all different ratios, too, but there's not that many of them - relatively speaking.) Thanks again for your help. You're a life-saver!
  10. staceyd

    [Contribution] POP-UPs MASSAGEed

    Hi! What a cool contribution! I have a question, though. My thumbnails are a lower quality than I would like (it's a photography site.) They lose too much of their color information (like if there's too few colors selected when making a gif.) So, they appear almost monochromatic. Is there a way to fix this? Thanks so much! Stacey
  11. staceyd

    Echo payment module

    Better late than never....I'm sure you've found this, but someone else might be looking. http://forums.oscommerce.com/index.php?showtopic=159375&hl=
×