Jump to content

beemertec

Members
  • Content count

    31
  • Joined

  • Last visited

Everything posted by beemertec

  1. PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/xxxxxx/public_html/vcom/includes/functions/database.php on line 104 is showing up thousands of times in my error log. Here is line 103 and 104 of includes/functions/database.php function tep_db_num_rows($db_query) { return mysqli_num_rows($db_query); Any ideas?
  2. beemertec

    Error Log going nuts on 2.3.4 bootstrap

    I am using 5.6.40 (Zend: 2.6.0).
  3. beemertec

    FedEx - Web Services v9

    I am using FedexWeb services and it works well for the most part. We wanted to add ground to Canada so I set Enable Intl Ground to true, but I don't see results. I called Fed-Ex and talked to tech support. We ran a test and he said that they returned a ground rate, but only the international economy and priority rates showed up.
  4. beemertec

    [Addon] Shopping List

    Jim, Will this add-on work with v2.2 or only 2.3? Thanks, Steve
  5. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    Jim, Do you think this code would correct the issue we are having? If so, I am willing to donate to the cause if you would let me know the cost. I know you are busy, and you get paid to do this kind of thing. I am happy to pay to help expedite the process. Best Regards, Steve
  6. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    Hi Kevin, The weird thing is that it works most of the time. We run 100-150 orders per day, roughly half are USPS shipping, and we end up with a handful with this problem. Sometimes we go weeks without it occurring.
  7. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    Thanks Jim. The first response actually generated the quotes properly. I am using the latest version. It is the one that a.forever put up this morning. As far as the second one, I have a few questions: 1. Am I the only person this happens to? 2. If the shipping shows up at checkout_shipping is there any reason that the mod has to resend the request to the USPS at checkout_confirmation? 3. If it does have to resend, is there a way that I can prevent the customer from checking out if there is no shipping method listed (other than u:) at checkout_confirmation? Thanks again for your help. This used to happen rarely, but over the past week it is 4 or 5 times a day and increasing in frequency. Best Regards, Steve
  8. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    Jim, I updated with a.forever's last version of the mod and my first class is working again. I am still having the problem with shipping showing up as u: in the checkout screen. It seems to be random, but only happens when a customer chooses USPS as the shipping method. Here are two emails from the mod. The first is from when the customer checked the rates and the second is at checkout. Keep in mind that the checkout_shipping screen allows them to choose the USPS method. It is the confirmation screen where it seems to get dropped. 10:51 AM Request: API=RateV4&XML=<RateV4Request USERID="xxxxxxxxxx"><Revision>2</Revision><Package ID="0"><Service>STANDARD POST</Service><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0</Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0</Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request> Response: <?xml version="1.0" encoding="UTF-8"?> <RateV4Response><Package ID="0"><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0</Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable><Zone>5</Zone><Postage CLASSID="4"><MailService>Standard PostRM</MailService><Rate>5.87</Rate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.30</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>2.10</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS TrackingTM</ServiceName><Available>true</Available><AvailableOnline>true! </AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>7</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>4.40</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature ConfirmationTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.90</Price><PriceOnline>2.35</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package><Package ID="1"><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0! </Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGUL AR</Size><Zone>5</Zone><Postage CLASSID="1"><MailService>Priority Mail 2-DayTM</MailService><Rate>6.00</Rate><CommercialRate>5.54</CommercialRate><SpecialServices><SpecialService><ServiceID>9</ServiceID><ServiceName>Certificate of Mailing</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>1.30</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>1</ServiceID><ServiceName>Insurance</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>2.10</Price><PriceOnline>2.10</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></SpecialService><SpecialService><ServiceID>5</ServiceID><ServiceName>Registered MailTM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>false</DueSenderRequired></Specia! lService><SpecialService><ServiceID>4</ServiceID><ServiceName>Registered without Insurance</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>11.95</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>0</ServiceID><ServiceName>Certified MailRM</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>3.30</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>13</ServiceID><ServiceName>USPS TrackingTM</ServiceName><Available>true</Available><AvailableOnline>true</AvailableOnline><Price>0.00</Price><PriceOnline>0.00</PriceOnline></SpecialService><SpecialService><ServiceID>7</ServiceID><ServiceName>Return Receipt for Merchandise</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>4.40</Price><PriceOnline>0</PriceOnline></SpecialService><SpecialService><ServiceID>15</ServiceID><ServiceName>Signature ConfirmationTM</ServiceName><A! vailable>true</Available><AvailableOnline>true</AvailableOnline><Price >2.90</Price><PriceOnline>2.35</PriceOnline></SpecialService><SpecialService><ServiceID>19</ServiceID><ServiceName>Adult Signature Required</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.20</PriceOnline></SpecialService><SpecialService><ServiceID>20</ServiceID><ServiceName>Adult Signature Restricted Delivery</ServiceName><Available>false</Available><AvailableOnline>true</AvailableOnline><Price>0</Price><PriceOnline>5.45</PriceOnline></SpecialService><SpecialService><ServiceID>6</ServiceID><ServiceName>Collect on Delivery</ServiceName><Available>true</Available><AvailableOnline>false</AvailableOnline><Price>6.95</Price><PriceOnline>0</PriceOnline><DeclaredValueRequired>true</DeclaredValueRequired><DueSenderRequired>true</DueSenderRequired></SpecialService></SpecialServices></Postage></Package></RateV4Response> 11:02AM Request: API=RateV4&XML=<RateV4Request USERID="xxxxxxxx"><Revision>2</Revision><Package ID="0"><Service>STANDARD POST</Service><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0</Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package><Package ID="1"><Service>PRIORITY COMMERCIAL</Service><ZipOrigination>30276</ZipOrigination><ZipDestination>55008</ZipDestination><Pounds>0</Pounds><Ounces>15</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request> Response: (This was blank)
  9. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    As of Friday afternoon, (not exactly certain what time) my USPS domestic first class mail stopped returning rates. The International first class is fine. Has anyone heard of an issue with this over the weekend? I also have a second issue that I have had for years, but no one else seems to complain about. It seems to be random, in that we may go weeks without the problem and then have it happen a couple of times a day for a week then go away again. Basically a customer chooses the shipping method at checkout. We believe we have narrowed the method down to USPS Priority. They enter the credit card information and continue. When they get to the confirmation screen the shipping method shows "u:" with no costs. The customer can finish the checkout, but the system does not charge for shipping. In the back end of the cart the shipping shows as "u:" We have checked to see if any products were shared between the orders that have this issue, but they do not. Also, this has happened using various USPS mods over the years. I am just wondering if anyone else has ever experienced this? Thanks!
  10. beemertec

    [Contribution] - USPS Methods

    I downloaded this usps.php file that was posted over in the V4,V2 thread, and it works with 5.2.2. I do not know if it work with 6.1. I just removed the USPS in admin, uploaded the file and reinstalled USPS, filled in the blanks and it works perfectly. I am using Parcel, Priority, Express, and Int'l Priority. The quotes work. The handling fee works. The names show up correctly including the trademark symbols. I hope this helps some other folks here. Thanks Jim!
  11. beemertec

    USPS Rate V4, Intl Rate V2 (official support thread)

    Hi Jim, I installed this update. Just so you know, it works with USPS methods 5.2.2 as well. The only thing I can't get to work is Show Intl Regulations: but I haven't had that before anyway. Thanks, Steve
  12. beemertec

    [Contribution] - USPS Methods

    I am not getting any international rates. Has anyone figured this out?
  13. beemertec

    [Contribution] - USPS Methods

    I was using a different USPS mod until today, but since the 5.2.1 version of this has been updated so it will work, I added it to my cart. I now have USPS again! I do have a problem in that on my shipping estimator and checkout shipping page the trademarks show as <sup>®</sup> and <sup>™</sup>. The install notes seem to give the fix for this, but it did not work. Here are the instructions and my results: I do have shipping estimator, but I checked shipping_estimator and shipping_estimator_popup and didn't find anything even close to: <td class="main" width="75%"><?php echo $method_data['title']; ?></td> I searched my entire site in DW and could not find it. This I was able to do. This I was able to do. So the only change I was unable to make was to the shipping estimator. I am running a heavily modified version of 2.2-MS2 on PHP5.2.8 if that helps. I am no coder, but I can generally add the mods in and figure out the issues, but this one has me stumped. Thanks in advance for your help.
  14. beemertec

    FedEx - Web Services v9

    Does anyone know of a mod in checkout_shipping.php that would allow the page to work properly, showing the other shipping methods when a problem occurs with web services? In other words, instead of a blank page, it just leaves Fed-Ex off if the server does not respond within a given time?
  15. I installed customer_discount_v1.1 in my heavily modded cart. It was a simple install and works great with one exception. When it calulates the discount, it always rounds up to the nearest penny, but the total is apparently rounding properly. This causes an error when I import to QB. As an example, I have an order: Sub-Total: $948.70 FedEx (Ground Home Delivery ---Approx. delivery time THREE Days): $75.86 VIP Discount: $142.31 Total: $882.26 The actual discount is $948.70 x 15% = $142.305. As you can see, the discount module rounded up instead of down. $948.70 + $75.86 -$142.31 =$882.25 not $882.26. Although this problem could theoretically be fixed in a couple of ways, my preference would be to modify the ot_customer_discount.php file to correct the rounding error. Unfortunatley, I do not know what I need to change to correct it. Here is the code: <?php /* $Id: ot_customer_discount.php,v 1.1 2002/07/22 07:36:01 amk Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class ot_customer_discount { var $title, $output; function ot_customer_discount() { $this->code = 'ot_customer_discount'; $this->title = MODULE_CUSTOMER_DISCOUNT_TITLE; $this->description = MODULE_CUSTOMER_DISCOUNT_DESCRIPTION; $this->enabled = MODULE_CUSTOMER_DISCOUNT_STATUS; $this->sort_order = MODULE_CUSTOMER_DISCOUNT_SORT_ORDER; $this->include_shipping = MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING; $this->include_tax = MODULE_CUSTOMER_DISCOUNT_INC_TAX; $this->calculate_tax = MODULE_CUSTOMER_DISCOUNT_CALC_TAX; $this->output = array(); } function process() { global $order, $currencies; if ($this->calculate_tax == 'true') { $tod_amount = $this->calculate_discount($order->info['tax']); } $od_amount = $this->calculate_discount($this->get_order_total()); if ($od_amount>0) { $this->deduction = $od_amount+$tod_amount; $this->output[] = array('title' => $this->title . ':', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] - $od_amount - $tod_amount; $order->info['tax'] = $order->info['tax'] - $tod_amount; } } function calculate_discount($amount) { global $customer_id; $od_amount=0; $query = tep_db_query("select customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); if ($query_result['customer_discount'] > 0) { $od_amount = (round($amount*10)/10)*($query_result['customer_discount']/100); } return $od_amount; } function get_order_total() { global $order; $order_total = $order->info['total']; if ($this->include_tax == 'false') $order_total=$order_total-$order->info['tax']; if ($this->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost']; return $order_total; } function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_CUSTOMER_DISCOUNT_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } function keys() { return array('MODULE_CUSTOMER_DISCOUNT_STATUS', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_CUSTOMER_DISCOUNT_STATUS', 'true', 'Do you want to enable the Customer specific order discount module?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CUSTOMER_DISCOUNT_SORT_ORDER', '999', 'Sort order of display.', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Shipping', 'MODULE_CUSTOMER_DISCOUNT_INC_SHIPPING', 'true', 'Include Shipping in calculation', '6', '5', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Include Tax', 'MODULE_CUSTOMER_DISCOUNT_INC_TAX', 'true', 'Include Tax in calculation.', '6', '6','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function ,date_added) values ('Calculate Tax', 'MODULE_CUSTOMER_DISCOUNT_CALC_TAX', 'false', 'Re-calculate Tax on discounted amount.', '6', '5','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")"); } } ?> Any help would be much appreciated.
  16. beemertec

    customer_discount_v1.1 rounding error

    Thanks MrPhil, I looked around my other ot_ files based on what you said. After function calculate_discount($amount) { global $customer_id; $od_amount=0; $query = tep_db_query("select customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); if ($query_result['customer_discount'] > 0) { $od_amount = (round($amount*10)/10)*($query_result['customer_discount']/100); } I replaced return $od_amount; with return tep_round($od_amount,2); That seems to have fixed it. I will check it over the course of a few days. If it works, I will update the add-on.
  17. beemertec

    SalesForce

    I am getting closer. I want a report that will only show the entries that have been shipped. In my case that is status 5. I also want it to only show orders with subtotals over $100.00. We only pay commission on orders over $100.00. In addition I did not need some of the fields. In admin/sales_reports.php, I commented out group, company, shipping, tax, and total. I only need sales rep, order, pur date, ship date, subtotal, and comm. I then commented those items out in modules/sales_reports.php. So far so good. Then I used: if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['sales_rep_name'] = $sales['sales_rep_firstname'] . ' ' .$sales['sales_rep_lastname']; if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['order_id'] = $sales['orders_id']; if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['order_date_purchased'] = date('m/d/Y', strtotime($sales['date_purchased'])); if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['order_date_shipped'] = ($sales['orders_status_id'] == 5) ? date('m/d/Y', strtotime($sales['date_added'])) : ' '; if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['order_subtotal'] = $orderSubtotal; if (($sales['orders_status_id'] == '5') && ($orderSubtotal > '100')) $rpt[$i]['group_commission'] = round(($orderSubtotal * $sales['group_commission']),2); This seemed logical to me, but it results in an empty table. I also tried the if statement with brackets around the full $rpt section and got the same result. If I remove the if statement from any of the above $rpt lines, the report will pull up. It will only show the information I want. However, it has empty rows for the orders that do not meet the requirements of the if statement. This results in a table that make take up 2 pages in a .pdf and only have 1 or 2 entries. Any ideas?
  18. beemertec

    SalesForce

    Thank you very much. That did the trick.
  19. beemertec

    SalesForce

    I figured out what is happening here. I have the same issue. Each time the status of an order is updated, it duplicates the entry on the sales report. When an order is placed, I see it on the report once. When I print the packing slip I update the status of the order. Then I get a duplicate on the sales report. When I ship the package, I update status again and I have 3 duplicates on the sales report. I am guessing it has something to do with this line: TABLE_ORDERS_STATUS_HISTORY . " osh on (osh.orders_id = ot.orders_id) $where "); but I am a programming dummy, so I wouldn't quote me on that. I hope this at least points you in the right direction.
  20. beemertec

    SalesForce

    This is a great mod. I think I may have done something wrong. When I run the report, my commission column shows .05. Does the mod not calculate the commission for the report? Also, is there a way to make the report sortable by column, so I could sort it by Sales rep? Thanks.
  21. beemertec

    Paypal issue

    I am having the same problem in my admin panel. When I click on paypalipn test or paypal transactions I kicked to the login page. I have to close and reopen my browser to log back in. All my files seem to be correct. Yesterday it worked fine on one of my sites and not on the other. Now I have the same problem on both sites but nothing has changed in my files or database. The front end of the cart works fine, it forwards me to paypal, I make payment, it takes me back to the cart. In the back end the order is there. I get the email verifications for payment sent and payment recieved. The only problem is in the back end on ipn test and txn.
  22. beemertec

    [Contribution] UPS XML Tracking

    Sorry I didn't know how to edit my last post as I said I think the code is not pulling the tracking # from the database. Here are the pertinent lines from account_history and account_history info . account_history <?php echo ' <td class="main" width="10%"><a href="java script:popupTrackerWindow(\'' . tep_href_link(FILENAME_POPUP_TRACKER, 'action=track&tracknum=' . $code) . '\')">' . tep_image_button('small_upstrack.gif') . '</a></td>' . "\n"; ?> account_history info <td class="main"><a href="java script:popupTrackerWindow('<?php echo tep_href_link(FILENAME_POPUP_TRACKER, 'action=track&tracknum=' . $order->info['ups_track_num']);?>')"><?php echo $order->info['ups_track_num']; ?></a></td> Another reason I believe this is a problem is I had to comment the follwing line out of account_history info in order to get the tracking table to show on the page if ($order->info['ups_track_num'] == NULL) Again, I can put the tracking number in admin and it shows up in the database. It just does not seem to pull up with this code.
  23. beemertec

    [Contribution] UPS XML Tracking

    I assume you are talking about the tracking.php file in classes. Yes it is, and as I said, if we manually input a tracking # on the tracking.php page it works. When we click the track button on the account_history or account_history_info pages, we get the error. My guess is that it is not pulling the tracking number from the database. I just don't understand php well enough to see what's wrong by looking in the code.
  24. beemertec

    [Contribution] UPS XML Tracking

    Sorry, In my above post I meant there is no link or button in account_history.php or account_history_info.php, but the tracking number is in the database for that order #.
×