Latest News: (loading..)

Supertex

Members
  • Content count

    291
  • Joined

  • Last visited

  • Days Won

    2

Supertex last won the day on August 16 2015

Supertex had the most liked content!

1 Follower

About Supertex

  • Birthday 01/01/1970

Profile Information

  • Real Name
    Shawn
  • Gender
    Male
  • Location
    Wichita Falls, Texas

Recent Profile Visitors

10,226 profile views
  1. I have $pkg_val as a session variable. Can I use that in the class constructor, or do I have to make that a global somehow? - and thank you for the reply. I love this community!
  2. Anyone happen to know where the test for whether the shipping module is enabled occurs, and if I can add a condition in that test that would disable the module if the subtotal is over a certain value?
  3. Yep, tried that. I don't think $subtotal exists at this point, and I didn't want to chance screwing something up down the line that might use it so I added this to shopping_cart.php: $pkg_val = $cart->show_total(); tep_session_register ('pkg_val'); and then used $pkg_val in place of $subtotal in the shipping class. Now it works. Thanks Jim :)
  4. Problem was between the seat and the keyboard. function cheapest() { global $is_cont48, $shipping_weight... I never added the bold. Now it works. Just have to figure out what to use for the cart value. I thought maybe: (($is_cont48 != 1) && ($shipping_weight < 0.8125) && ($subtotal < 400.00)) but that's not worked so far.
  5. I actually used 0.8125 first, and it didn't work. The '.8125' was kind of a hail Mary. Any other ideas?
  6. @kymation I wonder if you might have a solution for a couple of things. I'm trying to choose the 'second' USPS quote as default if: 1) international 2) under 13 oz. 3) under $400 My code: $cheapest = false; for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if (is_array($cheapest)) { if ($rates[$i]['cost'] < $cheapest['cost']) { $cheapest = $rates[$i]; } } else { $cheapest = $rates[$i]; } } if($is_cont48 == 1){ $cheapest = $rates[0]; } if(($is_cont48 != 1) && ($shipping_weight < '.8125')){ $cheapest = $rates[1]; //Set default USPS method to "2nd" in array. Add exception for orders with value over $400, or weight over 13oz } return $cheapest; First I added the $is_cont48 test. It works. Then I added the $shipping_weight (which is used elsewhere in the file) but it doesn't work. Regardless of whether the weight is over or under .8125, the test returns true, and I get $rates[1]. Not sure what I'm doing wrong. And what would I use to test cart value? I see $pkgvalue used in the usps module file, but don't I need to make that a global before the class file can use it in a test?
  7. Still having issues with UPS dropping insurance, and this time it's not a customer playing around with navigation...at least not that I can find. I've combed over the UPSXML.log and at least part of this appears to be a hiccup at UPS. I've got log entries for the same customer, 9 seconds apart, that ONLY differ in the negotiated rates price for the various services. Everything else - account info, delivery address, cart value, service options charges, transportation charges, etc., is the exact same. It's just that one quote has insurance added, and one does not. Any thoughts on this?
  8. Perhaps. However, I don't think I've ever gotten emails when an order is submitted...I wouldn't want any more emails than I'm getting already. So either I saw that option very early on, and turned it off, or 2.3.1 doesn't have that option.
  9. The customer does get 2x the emails. I don't get emails when an order is processed.
  10. Going to try some things like this: SELECT * FROM `orders_status_history` WHERE `orders_id` IN ( SELECT `orders_id` FROM `orders_status_history` WHERE `customer_notified` =1 AND `orders_status_id`=2 HAVING count (`orders_id`) >1 ) ORDER BY `orders_id` Didn't work as I threw it together...got a #1630 'function db.count' does not exist. I'll work on it more tomorrow.
  11. @Dan Cole It is coincidence. The site is integrated with Stamps.com, and it auto-updates status once a shipping label has printed, but I don't have it emailing the customer the status update automatically. So in that case, in order for the customer to know the order shipped, a second 'shipped' status was issued with an email notification condition...note the checkmarks. And yes, it's troublesome. I'd seen it early on, but figured the chances of both events occurring that close to each other very often was slim. I was wrong. I've had issues with inventory for some time, and now I see why. Like I said...the nasty part of this issue, is that you'd never know it was happening until you see something odd like a "-1" for an item quantity. Now...the odds of the return and the IPN both landing in the same second, I would have thought was low. The odds of it happening on an order where a quantity of 1 was ordered, and a quantity of only 1 was available...even lower...almost like getting hit by lightning twice. So, that should indicate, at least to some degree, just how frequently this has to be occurring and NOT being noticed. So far, just skimming over the DB tables, I see it occurring once a month, and one of those orders was 27 line items with quantities varying between 4 and 50. This is a very real problem.
  12. @kymation @burt @Harald Ponce de Leon This thread has gotten a bit off topic, but I'd like to pull back to the subject of the OP, and get the problem back on the table. I'm still seeing events where the customer return from PayPal, and the IPN land at the exact same time, or close enough that BOTH events trigger a stock decrement. Problem is, I only become aware when I see something odd, like a negative stock number, which shouldn't be possible - at least as a result of order completion. This time, once I realized it happened again, I went back through the orders_status_history table, and looked for consecutive duplicate lines. I only went back 6 months, but I found 5 instances where stock was hit for double...and only one of the 5 resulted in a negative number, or I'd never have known. This is wreaking havoc on inventory numbers. How can this be combated? I could see perhaps requesting a delay on the IPN dispatch from PP, but that would only really reduce the potential for this to happen...it's not really a 'fix'. Like I mentioned...you can see this in the orders_status_history, because you get a double entry for "payment completed" for the same order ID/status. If a query can be structured that will compare lines from the table and find any that match with the exception of the order_status_history_id, then a flag can be set and something added to the error/message stack on the admin that would at least provide an alert that it's occurred. For the record, the left and right half of the image are from different orders, but it still creates a clear picture of what's going on.
  13. This seems to have fixed the problem entirely. Thank you Jim...yet again.
  14. This is happening to me as well. 3 times now in the last two weeks or so. Prior, this might have happened twice in the last two years.
  15. @@Harald Ponce de Leon Lately, I've had two instances of an order being placed, and it shows up at paypal as a paid order, but there's no record of the order in the store. If I look at the PP logs (in the app) I see the '_notify-synch' for the order with "VERIFIED" in the response...shows the cart items...amount, etc. Any idea why the order is getting deleted by the store?? I haven't updated the app because it's been working ok - still at 4.039. Any ideas?