Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  1. kaligear

    Graphical Borders

    Hi Sam, Thank you for the reply. I have had newsdesk for some time, so the version is not current. I just installed easy graphical borders today (the latest version) and noticed some errors when examining the results. I think the source of my problem was actually a recent server upgrade together with SQL upgrades. I think I have mostly fixed / bandaged newsdesk for now thanks to some newsdesk forum entries including your own. Perhaps now I can upgrade newsdesk to the latest. The only problem that remains is to get estimate shipping to work with graphical borders. I'm not sure how it broke. thanks, Leslie
  2. kaligear

    Graphical Borders

    Thank you very much for the contribution. It is working well except for a few contributions items that seem to be broken now. I'm guessing I need add some code in these to make them use your code. Will you please help me fix my newsdesk feature: (I'm clueless one this one.) http://kaligear.com/catalog/newsdesk_index.php error: 1054 - Unknown column 'p.newsdesk_id' in 'on clause' select count(p.newsdesk_id) as total from newsdesk_description pd, newsdesk p left join manufacturers m on p.newsdesk_id = m.manufacturers_id, newsdesk_to_categories p2c left join specials s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '1' and p2c.categories_id = '0' And my estimated shipping: (I think I need to somehow put this in my stylesheet?) Fatal error: Class 'estimatedshippingBoxHeading' not found in /home/kaligear/public_html/catalog/includes/modules/estimated_shipping.php on line 29 thank you for any help or direction! Leslie
  3. kaligear

    Estimated Shipping Costs

    I have had estimate shipping installed for several months now. I believe it was working just fine. However, I just noticed that when someone tries to use it for international estimates, they must put something (anything) in the zip code blank, otherwise there is no result. If they do put a number, even just a single digit, then they will get an estimate that looks accurate. Is there some change I can make to remove this requirement to enter something in the box for the international estimates? I am selling from the US. I would very much appreciate any help. thank you, Leslie the site is: http://www.kaligear.com
  4. kaligear

    PDF Invoice for american paper size

    Here is the code: <?php /* $Id: create_pdf,v 1.4 2005/04/07 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License Written by Neil Westlake (nwestlake@gmail.com) for www.Digiprintuk.com Version History: 1.1 Initial release 1.2 Corrected problem displaying PDF when from a HTTPS URL. 1.3 Modified item display to allow page continuation when more than 20 products are on one invoice. 1.4 Corrected problem with page continuation, now invoices will allow for an unlimited amount of products on one invoice */ define('FPDF_FONTPATH','fpdf/font/'); require('fpdf/fpdf.php'); require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ORDERS_INVOICE); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); include(DIR_WS_CLASSES . 'order.php'); while (list($key, $oID) = each($_GET)) { if ($key != "oID") break; $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'"); $order = new order($oID); class PDF extends FPDF { //Page header function RoundedRect($x, $y, $w, $h,$r, $style = '') { $k = $this->k; $hp = $this->h; if($style=='F') $op='f'; elseif($style=='FD' or $style=='DF') $op='B'; else $op='S'; $MyArc = 4/3 * (sqrt(2) - 1); $this->_out(sprintf('%.2f %.2f m',($x+$r)*$k,($hp-$y)*$k )); $xc = $x+$w-$r ; $yc = $y+$r; $this->_out(sprintf('%.2f %.2f l', $xc*$k,($hp-$y)*$k )); $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc); $xc = $x+$w-$r ; $yc = $y+$h-$r; $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-$yc)*$k)); $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r); $xc = $x+$r ; $yc = $y+$h-$r; $this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-($y+$h))*$k)); $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc); $xc = $x+$r ; $yc = $y+$r; $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k )); $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r); $this->_out($op); } function _Arc($x1, $y1, $x2, $y2, $x3, $y3) { $h = $this->h; $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k, $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k)); } function Header() { global $oID; $date = strftime('%A, %d %B %Y'); //Logo $this->Image('images/invoice_logo2.jpg',5,10,50); // Invoice Number and date $this->SetFont('Arial','B',14); $this->SetTextColor(153,153,153); $this->SetY(37); $this->MultiCell(100,6,"Invoice: #" . $oID . "\n" . $date ,0,'L'); // Company Address $this->SetX(0); $this->SetY(10); $this->SetFont('Arial','B',10); $this->SetTextColor(153,153,153); $this->Ln(0); $this->Cell(149); $this->MultiCell(50, 3.5, STORE_NAME_ADDRESS,0,'L'); //email $this->SetX(0); $this->SetY(37); $this->SetFont('Arial','B',10); $this->SetTextColor(153,153,153); $this->Ln(0); $this->Cell(95); $this->MultiCell(100, 6, "E-mail: " . STORE_OWNER_EMAIL_ADDRESS,0,'R'); //website $this->SetX(0); $this->SetY(42); $this->SetFont('Arial','B',10); $this->SetTextColor(153,153,153); $this->Ln(0); $this->Cell(88); $this->MultiCell(100, 6, "Web: " . HTTP_SERVER,0,'R'); } function Footer() { //Position at 1.5 cm from bottom $this->SetY(-17); //Arial italic 8 $this->SetFont('Arial','',10); $this->SetTextColor(0,0,0); $this->Cell(0,10, PRINT_INVOICE_TEXT, 0,0,'C'); //$this->SetY(-15); //$this->Cell(0,10, PRINT_INVOICE_URL, 0,0,'C'); //Page number //$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } } //Instanciation of inherited class $pdf=new PDF(); // Set the Page Margins $pdf->SetMargins(6,2,6); // Add the first page $pdf->AddPage(); //Draw the top line with invoice text $pdf->Cell(50); $pdf->SetY(60); $pdf->SetDrawColor(153,153,153); $pdf->Cell(15,.1,'',1,1,'L',1); $pdf->SetFont('Arial','BI',15); $pdf->SetTextColor(153,153,153); $pdf->Text(22,61.5,'Invoice'); $pdf->SetY(60); $pdf->SetDrawColor(153,153,153); $pdf->Cell(38); $pdf->Cell(160,.1,'',1,1,'L',1); //Draw Box for Invoice Address $pdf->SetDrawColor(0); $pdf->SetLineWidth(0.2); $pdf->SetFillColor(255); $pdf->RoundedRect(6, 67, 90, 35, 2, 'DF'); //Draw the invoice address text $pdf->SetFont('Arial','B',10); $pdf->SetTextColor(0); $pdf->Text(11,77, ENTRY_SOLD_TO); $pdf->SetX(0); $pdf->SetY(80); //$pdf->SetFont('Arial','B',8); //$pdf->SetTextColor(0); $pdf->Cell(9); $pdf->MultiCell(70, 3.3, tep_address_format(1, $order->customer, '', '', "\n"),0,'L'); //Draw Box for Delivery Address $pdf->SetDrawColor(0); $pdf->SetLineWidth(0.2); $pdf->SetFillColor(255); $pdf->RoundedRect(108, 67, 90, 35, 2, 'DF'); //Draw the invoice delivery address text $pdf->SetFont('Arial','B',10); $pdf->SetTextColor(0); $pdf->Text(113,77,ENTRY_SHIP_TO); $pdf->SetX(0); $pdf->SetY(80); $pdf->Cell(111); $pdf->MultiCell(70, 3.3, tep_address_format(1, $order->delivery, '', '', "\n"),0,'L'); //Draw Box for Order Number, Date & Payment method $pdf->SetDrawColor(0); $pdf->SetLineWidth(0.2); $pdf->SetFillColor(255); $pdf->RoundedRect(6, 107, 192, 11, 2, 'DF'); //Draw Order Number Text $temp = str_replace(' ', ' ', PRINT_INVOICE_ORDERNR); $pdf->Text(10,113, $temp . tep_db_input($oID)); //Draw Date of Order Text $temp = str_replace(' ', ' ', PRINT_INVOICE_DATE); $pdf->Text(75,113,$temp . tep_date_short($order->info['date_purchased'])); //Draw Payment Method Text $temp = substr ($order->info['payment_method'] , 0, 23); $pdf->Text(130,113,ENTRY_PAYMENT_METHOD . ' ' . $temp); //$pdf->Cell(198,29,ENTRY_PAYMENT_METHOD . ' ' . $temp, 0, 0, 'R'); //Fields Name position $Y_Fields_Name_position = 125; //Table position, under Fields Name $Y_Table_Position = 131; function output_table_heading($Y_Fields_Name_position){ global $pdf; //First create each Field Name //Gray color filling each Field Name box $pdf->SetFillColor(255); //Bold Font for Field Name $pdf->SetFont('Arial','B',10); $pdf->SetY($Y_Fields_Name_position); $pdf->SetX(6); $pdf->Cell(9,6,'Qty',1,0,'C',1); $pdf->SetX(15); $pdf->Cell(27,6,TABLE_HEADING_PRODUCTS_MODEL,1,0,'C',1); $pdf->SetX(40); $pdf->Cell(78,6,TABLE_HEADING_PRODUCTS,1,0,'C',1); //$pdf->SetX(105); //$pdf->Cell(15,6,TABLE_HEADING_TAX,1,0,'C',1); $pdf->SetX(118); $pdf->Cell(20,6,TABLE_HEADING_PRICE_EXCLUDING_TAX,1,0,'C',1); $pdf->SetX(138); $pdf->Cell(20,6,TABLE_HEADING_PRICE_INCLUDING_TAX,1,0,'C',1); $pdf->SetX(158); $pdf->Cell(20,6,TABLE_HEADING_TOTAL_EXCLUDING_TAX,1,0,'C',1); $pdf->SetX(178); $pdf->Cell(20,6,TABLE_HEADING_TOTAL_INCLUDING_TAX,1,0,'C',1); $pdf->Ln(); } output_table_heading($Y_Fields_Name_position); //Show the products information line by line for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { //for attributes - start $thickness = 6; $border_string = 'TB'; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { $border_string = '0'; for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { $thickness += 3; } } $pdf->SetFont('Arial','',10); $pdf->SetY($Y_Table_Position); $pdf->SetX(6); $pdf->MultiCell(9,$thickness ,$order->products[$i]['qty'],1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(40); if (strlen($order->products[$i]['name']) > 40 && strlen($order->products[$i]['name']) < 55){ $pdf->SetFont('Arial','',8); $pdf->MultiCell(78,6,$order->products[$i]['name'],$border_string,'L'); if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetFont('Arial','',6); $pdf->SetX(40); if ($j == $k-1) { $att_border_string = 'B'; } else { $att_border_string = 0; } $pdf->MultiCell(78, 3, "- " . $order->products[$i]['attributes'][$j]['option'] . ": " . $order->products[$i]['attributes'][$j]['value'],$att_border_string,'L'); } } } else if (strlen($order->products[$i]['name']) > 55){ $pdf->SetFont('Arial','',8); $pdf->MultiCell(78,6,substr($order->products[$i]['name'],0,55),$border_string,'L'); if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetFont('Arial','',6); $pdf->SetX(40); if ($j == $k-1) { $att_border_string = 'B'; } else { $att_border_string = 0; } $pdf->MultiCell(78, 3, "- " . $order->products[$i]['attributes'][$j]['option'] . ": " . $order->products[$i]['attributes'][$j]['value'],$att_border_string,'L'); } } } else{ $pdf->SetFont('Arial','',8); $pdf->MultiCell(78,6,$order->products[$i]['name'],$border_string,'L'); if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { $pdf->SetFont('Arial','',6); $pdf->SetX(40); if ($j == $k-1) { $att_border_string = 'B'; } else { $att_border_string = 0; } $pdf->MultiCell(78, 3, "- " . $order->products[$i]['attributes'][$j]['option'] . ": " . $order->products[$i]['attributes'][$j]['value'],$att_border_string,'L'); } } } $pdf->SetFont('Arial','',10); //$pdf->SetY($Y_Table_Position); //$pdf->SetX(95); //$pdf->MultiCell(15,6,tep_display_tax_value($order->products[$i]['tax']) . '%',1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(15); $pdf->SetFont('Arial','',8); $pdf->MultiCell(25,$thickness ,$order->products[$i]['model'],1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(118); $pdf->SetFont('Arial','',10); $pdf->MultiCell(20,$thickness ,$currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']),1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(138); $pdf->MultiCell(20,$thickness ,$currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']),1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(158); $pdf->MultiCell(20,$thickness ,$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']),1,'C'); $pdf->SetY($Y_Table_Position); $pdf->SetX(178); $pdf->MultiCell(20,$thickness ,$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']),1,'C'); $Y_Table_Position += $thickness; //for attributes - end //Check for product line overflow $item_count++; if ((is_long($item_count / 32) && $i >= 20) || ($i == 20)){ $pdf->AddPage(); //Fields Name position $Y_Fields_Name_position = 125; //Table position, under Fields Name $Y_Table_Position = 70; output_table_heading($Y_Table_Position-6); if ($i == 20) $item_count = 1; } } for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { $pdf->SetY($Y_Table_Position + 5); $pdf->SetX(102); $temp = substr ($order->totals[$i]['text'],0 ,3); //if ($i == 3) $pdf->Text(10,10,$temp); if ($temp == '<b>') { $pdf->SetFont('Arial','B',10); $temp2 = substr($order->totals[$i]['text'], 3); $order->totals[$i]['text'] = substr($temp2, 0, strlen($temp2)-4); } //changed to code below $pdf->MultiCell(94,6,$order->totals[$i]['title'] . ' ' . $order->totals[$i]['text'],0,'R'); $pdf->MultiCell(100,6,strip_tags($order->totals[$i]['title']) . ' ' . strip_tags($order->totals[$i]['text']),0,'R'); $Y_Table_Position += 5; } // Draw the shipping address for label //Draw the invoice delivery address text /* $pdf->SetFont('Arial','B',11); $pdf->SetTextColor(0); //$pdf->Text(117,61,ENTRY_SHIP_TO); //$pdf->SetX(0); $pdf->SetY(240); $pdf->Cell(20); $pdf->MultiCell(50, 4, strtoupper(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L'); */ } // PDF's created now output the file $pdf->Output(); ?>
  5. I very much like the PDF Invoice contribution. Thank you to the developers! However after printing it, I discovered it is for a page that is 8.3 x 11.7 inches long, not 11 inches (the standard US size). I can print through Adobe Reader reducing the overall page content, but that requires more clicks and I would prefer to print the text at full size. Can anyone tell me how to convert the page size from a European size to an 8.5 x 11 inch page? I am not familiar with the code used to layout the page. thank you in advance, Leslie
  6. kaligear

    NEW! Complete Order Editing Tool!

    Great! Thank you very much! I'll get to it.
  7. kaligear

    NEW! Complete Order Editing Tool!

    I would like to upgrade from v1.81 by djmonkey1 to a current version. Can anyone recommend where to start? Should I just try to modify the files or try to uninstall the old then reinstall the newest version. Seems like there has been a lot of progress since my initial installation! thank you for any advice, Leslie
  8. kaligear

    France Shipping address creates Error

    I am getting this error when someone tries to order from France, Metropolitan also. Is it possible to remove that option from the list. Did you get this resolved. thank you, Leslie
  9. kaligear

    Faq Page - Contribution Added

    I just added the same contribution, but saw no links or results. How did you add the language files? In other words, what did you need to put in the file? I also found that I can go to the management page in admin via typing in the url to faq.php, but there are no links in the admin section nor is there on the catalog. I also click on the icons next to the individual faqs only to get an error that says : Not Found The requested URL /catalog/admin/FILENAME_PAGES was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Seems there is more I must add. Please give me some direction if you don't mind. thank you very much, Leslie
  10. I can't get it to work either. I'm in the USA using cingular wireless (now AT&T), which uses [10digit number]@mmode.com. I can send a text with my email system fine. Just not getting anything when an order is placed. Is anyone else getting it to work with the same provider. Any ideas otherwise how I can make it work? thank you, Leslie
  11. kaligear

    [Contribution] Admin Summary Info

    actually, I am mistaken about todays numbers - after looking through the customer records, I saw a registration. Sorry for the false alarm! Leslie
  12. kaligear

    [Contribution] Admin Summary Info

    I very much like the contribution, but I discovered the number of # of customers Today is reporting the wrong number. It states that there are 3, but in fact there were only 2. Have I done something wrong installing it? The last customer before today was 2 days ago. Are there any configurations I must change? thank you all for any help! Leslie (kaligear) On a side note: I also recently installed Customer Registration Report (http://www.oscommerce.com/community/contributions,2774), but it is not reporting any new registrations since I installed it. I'm wondering if somehow the calculations or database is corrupted?
  13. kaligear

    [Contribution] - USPS Methods

    Never mind everyone. I just misunderstood the directions. I thought I only had to run one of the database commands, but you must run them both if you are updating. Funny how you have to read everyone else's posts several times before you realize you have the same problems. At least for someone as slow as me, that's what it takes. :huh: best regards all, Leslie
  14. kaligear

    [Contribution] - USPS Methods

    well, I tried it before waiting to hear back and now I see this error at the top of my shipping modules page: Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /home/kaligear/public_html/catalog/admin/modules.php(216) : eval()'d code on line 1 Also, I am unable to select which international shipping options I can offer. Does anyone have any suggestions? thank you, Leslie
  15. kaligear

    [Contribution] - USPS Methods

    Thank all of you working this out for the benefit of us all. I am using version 2.8d as it was from January. In order to upgrade for the recent USPS changes, will following the instructions last posted by kbucher on May 9 be sufficient? or will I be missing any steps along the way? thank you, Leslie