Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Supertex

Members
  • Posts

    315
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Supertex

  1. Mine went down yesterday morning, and then was up again for a while, and now is down yet again. A thread on sellercommunity.com cites a change to the API, any info on this?
  2. Well...thought it worked, but it was sending the email for every transaction. Did a little digging, and it appears that strcasecmp returns zero or non-zero, rather than true of false. This made it work, as far as I can tell: if ((strcasecmp($blacklisted['entry_street_address'], $order->delivery['street_address'])== 0) && (strcasecmp($blacklisted['entry_suburb'], $order->delivery['suburb'])== 0) && (strcasecmp($blacklisted['entry_city'], $order->delivery['city'])== 0) && (strcasecmp($blacklisted['entry_postcode'], $order->delivery['postcode'])== 0) && (strcasecmp($blacklisted['entry_state'], $order->delivery['state'])== 0)) {
  3. That seems to have broken it. Im seeing this in the error log: [26-Mar-2022 20:53:45 America/Chicago] PHP Warning: strcasecmp() expects exactly 2 parameters, 1 given in /home/public_html/checkout_process.php on line 363 Edit: NVM...found it. There was a period between the street address comparisons...I just copy/pasted from your post. It works
  4. BTW...I assume it wouldn't be too complicated to add some code in the create_account.php that would look for name, phone, and make that same comparison on address book entries?
  5. Thanks Jack. We do appreciate ya, sir.
  6. Hi Jack, Recently had an issue where a banned customer came back and created a new account with a different email (he'd made no attempt to login with his original email recently), and used the same address as he'd used before. Originally though, his city entry used all caps. When he created the new account, only the first letter of the city was cap'd, so his street address was not 'strictly' the same. There was no email sent to notify that an order on the new account had occurred. Am I correct in assuming the difference in caps usage is why? I noticed this in the code of checkout_process.php: $blacklisted['entry_street_address'] === $order->delivery['street_address'] Would changing the "===" to "==" solve the issue, or would the address string require 'scrubbing' or normalization before comparison? Please forgive my ignorance, I know just enough to be dangerous, heh.
  7. BTW...what protection do I as a merchant have if someone uses a stolen card here? If someone has a stolen card, all they need is a zip code and this transaction will pass, yes? Nothing authenticating a card's zip code with a site user's payment address? So no protection from charge back... or am I missing something?
  8. @djmonkey1 Seems like I would be able to find more information about using this mod in a v2.3.1 store with SPPC and Quantity Discounts, but I'm not having great luck. The Quantity Discounts mod works great on the front side. In fact, I duplicated it, using one version for Category Discounts, and the other for Line Item discounts. This way, both or either can be toggled on a customer group or customer id basis. Again...works -great- as a visiting customer. The problem comes when I try to edit an order. Let's say I have an order for which neither discount (line or category) is toggled on, for either account or customer group. If I edit the order and add enough product that the criteria for the discount is met, the discount applies itself. Or...if they'd purchased enough to meet one or all of the criteria, once I open it in the editor and change anything, the discounts apply. I can't even adjust shipping without having this happen. I'm at a loss.
  9. Any idea how to omit a method? As in...I have a heavy package that wants to return both Ground Home Delivery, and FedEx Ground. I want to omit FedEx Ground...as in remove it from the methods array completely. I want the methods array to contain ONLY Ground Home Delivery...but Im not sure how to do that.
  10. Anyone else seeing a drastic reduction in price for FCP Intl?
  11. Been a while since I've messed with payment modules, but doesn't entering a CC number this way change the PCI compliance scope for the site?
  12. Sometime I'm going to get up to WA, and when I do, I'm buying you a steak dinner. Thank you.
  13. @kymation Hey Jim, In chasing my need, I've duplicated the (outdated, I know) USPS module I've been using. It installs fine, including the defaults for package dimensions, so I've had partial success with it. However, it seems everytime I try to save settings in the admin, I get "Array" in 'package dimensions' and 'handling fees'. To clone it, I took the working USPS module files and duplicated them and renamed them. There were only 2 files: usps.php for the modules/shipping, and the same for the languages directory. Then I found every 'usps' and changed it to 'usps2'...constants, functions, variables, etc., along with filenames. I've put the old and new in WinMerge and ensured that the only differences are the aforementioned. Any idea what I might have missed? I think these are the functions associated with the problem: // Required configuration functions // USPS Methods. Added by Greg Deeth // Alias function for Store configuration values in the Administration Tool function usps2_cfg_select_multioption($select_array, $key_value, $key = '') { for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br /><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"'; $key_values = explode( ", ", $key_value); if ( in_array($select_array[$i], $key_values) ) $string .= ' CHECKED'; $string .= '> ' . $select_array[$i]; } $string .= '<input type="hidden" name="' . $name . '" value="--none--">'; return $string; } // Alias function for Store configuration values in the Administration Tool. function usps2_cfg_multiinput_list($select_array, $key_value, $key = '') { $key_values = explode( ", ", $key_value); for ($i=0; $i<sizeof($select_array); $i++) { $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value'); $string .= '<br /><input type="text" name="' . $name . '" value="' . $key_values[$i] . '" size="7"> ' . $select_array[$i]; } $string .= '<input type="hidden" name="' . $name . '" value="--none--">'; return $string; } /** * displays a json string as a list * * @param (string) $cfg_value */ function usps2_cfg_display_json_as_list( $cfg_value ){ $array = json_decode($cfg_value, true); $string = '<ul>'; foreach( $array as $li ){ $string .= '<li><pre>' . $li . '</pre></li>'; } $string .= '</ul>'; return $string; }
  14. Heya Jim, Still working on this much at all, or kinda letting it go? I have kind of a special need that could be solved by having a second USPS module for per-zone application, and rather than trying to rename/duplicate an ancient module...
  15. Well..for anyone else that needs something like this, in create_account_success.php add: $max_order_query = tep_db_query("SELECT max_order FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . $_SESSION['customer_id'] ."'"); $max_order_result = tep_db_fetch_array($max_order_query); $max_order = $max_order_result['max_order']; tep_session_register('max_order'); Just below: require(DIR_WS_INCLUDES . 'template_top.php'); And in checkout_shipping.php, add: if (isset($_SESSION['max_order'])) { $max_order = $_SESSION['max_order']; } just above: if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } This fixed it for me...or some part of it did =P
  16. @Johnson Old thread...and pretty simple mod, but I installed this yesterday and today, 2 out of 5 customers so far, have had issues with completing a transaction with far less than the max_value entry in the DB (I currently have it set to 2499.99). One customer's cart was only ~$150, but he was still directed from checkout_shipping to the max_order page. Both were new customers, and had just set up their accounts. But I tested new account functionality immediately after installation, with no issues whatsoever. In addition, other transactions went through just fine. I'm waiting to hear back from the customers on device type, OS, and browser, but I can't understand what might have happened...thoughts?
  17. 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!
  18. 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?
  19. 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 :)
  20. 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.
  21. I actually used 0.8125 first, and it didn't work. The '.8125' was kind of a hail Mary. Any other ideas?
  22. @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?
  23. 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?
×
×
  • Create New...