Jump to content

surknight

Members
  • Content count

    20
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Roland
  1. surknight

    Advice requested

    I have a general question regarding deprecated coding. I'm working on installing a module (Advanced Address Management) which uses $HTTP_POST_VARS rather liberally. The affected lines in the cart files (OSC 2.3.3) uses $_POST. For instance, one line in one of the AM contribution files reads $firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']); The corresponding line in the cart files reads $firstname = tep_db_prepare_input($_POST['firstname']); I understand that $HTTP_POST_VARS is deprecated and that $_POST isn't an exact equivalent. Should I change all the deprecated syntax to $_POST or just leave it as is? Thanks in advance.
  2. surknight

    Weird problem with language pack

    Found the problem - it's the cache. Hitting reset on the three entries (Categories box, Manufacturers box, and Also Purchased module) in Tools -->Cache Control got rid of the encoding problem on the manufacturer's box.
  3. surknight

    Weird problem with language pack

    Yes, the page encoding does show as UTF-8 at all times. Changing it to either Central European ISO or Central European Windows corrects the title bar for the manufacturer's box on the index page, but the rest of the page is in the wrong characters then. The second instance with the 'Canon' manufacturer selected doesn't show correctly no matter what the page encoding is set to. As far as the fonts are concerned it's Lucida sans-serif every time. It seems to be behaving almost as if there were a separate manufacturer's box for each manufacturer_id, but there isn't. :mellow:
  4. I'm having a problem with the manufacturer's box sometimes showing the wrong characters in the title and sometimes the wrong wording in dropdown list. Here's what it looks like on the store's index page: The language is Croatian and the word that should be showing is "Proizvođači" (Manufacturers). The word "Odaberite" under it means 'select'. The problem is that it doesn't show up like that all the time. If I select one of the manufacturer's names from the list I get this: The box title has obviously switched to another codepage, but it's still not right. Going further down the list of manufactures, I get this: All of a sudden the manufacturer's box is showing the correct characters and the top selection in the dropdown has changed to 'Molima odaberite' (Please select) which is the default dropdown defined in hrvatski.php. Everything is in UTF-8. All the language files are in UTF-8 without BOM (verified in Notepad ++). The database is in UTF-8. The setlocale for the language file is hr_HR.UTF-8 and the defined character set is UTF-8. Everywhere else on the page the characters show correctly (see the box under the one in question - it never changes). I searched every language file, and nowhere does either 'Odaberite' by itself as a dropdown selection or 'Proizvođači' with incorrect characters appear. Where else would the cart be pulling this from for the manufacturers box? Cart verion is 2.3.3, localhost installation. PHP version is 5.4.7 Thanks in advance.
  5. surknight

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

    Fixed it! Apparently, the stringable objects needed to be explicitly cast to strings as explained in the PHP Manual, so the problem line is now: if (tep_not_null($iExtras[(string) $val]) && (array_key_exists ('ServiceName', $iExtras[(string) $val]) && tep_not_null($iExtras[(string) $val['ServiceName']]) && ((constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Online' && $val[(string) 'AvailableOnline'] == 'True') || (constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Retail' && $val[(string) 'Available'] == 'True')))) { That gets rid of the warning on international quotes. Here are the patched files: Non-vendor: usps.php MVS variant (rename to usps.php before installing): usps-mvs.php
  6. surknight

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

    Thanks Jim. I'll post if I figure it out.
  7. surknight

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

    The error message is: Warning: Illegal offset type in C:\xampp\htdocs\mantisosc\includes\modules\vendors_shipping\usps.php on line 149 It's a localhost installation: osCommerce 2.3.3, xampp 1.8.1, PHP 5.4.7, which hasn't changed since I first installed it. The only thing that got changed about the o/s since Jan 2 was the Microsoft NET framework 4.5.1 for Windows Vista x64-based Systems (KB2858725) on 1/13. I'm not sure if that was when the cart broke again or later when USPS changed the API since I couldn't get back to work on it until last week.
  8. surknight

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

    Line 149 is acting up again for some reason. Nothing's changed since my last post, but for some reason I'm now getting a warning about an illegal offset type in line 149 for international quotes. Here's the modified line 149, which was working fine: if (tep_not_null($iExtras[$val]) && (array_key_exists ('ServiceName', $iExtras[$val]) && tep_not_null($iExtras[$val['ServiceName']]) && ((constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Online' && $val['AvailableOnline'] == 'True') || (constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Retail' && $val['Available'] == 'True')))) { Thanks in advance.
  9. surknight

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

    That got it. Thanks! :)
  10. surknight

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

    That throws a 'Warning: array_key_exists() expects parameter 2 to be array, null given' warning. Odd, since parameter 2 is an array, although an empty one.
  11. surknight

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

    Minor bug swat: On line 101 of the MVS version of usps.php, the space between the ' and MODULE_SHIPPING_USPS_INTL_SERVICES_ constant needs to be removed or it generates a warning that the constant MODULE_SHIPPING_USPS_INTL_SERVICES_1 can't be found. Also need help with this warning: Warning: Illegal string offset 'ServiceName' in C:\xampp\htdocs\catalog\includes\modules\vendors_shipping\usps.php on line 149 this is line 149: if (isset ($iExtras[$val['ServiceName']]) && tep_not_null($iExtras[$val['ServiceName']]) && ((constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Online' && $val['AvailableOnline'] == 'True') || (constant('MODULE_SHIPPING_USPS_RATE_TYPE_' . $vendors_id) == 'Retail' && $val['Available'] == 'True'))) { This only happens on international quotes, whether or not there are any service extras enabled, which is interesting as line 141 is virtually the same code as above ($dExtras instead of $iExtras) but doesn't generate the same warning.
  12. surknight

    Multi_Vendor_Shipping new thread

    Need a little help with a preg_replace error. I'm getting this error when I try installing the MVS version of the USPS module provided with MVS: Warning: preg_replace(): No ending delimiter ',' found in C:\xampp\htdocs\catalog\admin\vendor_modules.php on line 27 This is line 27 of that file: $value = preg_replace (", --none--", "", $value); Any help would be appreciated. I've read the PHP documentation on preg statements and can't quite see the problem.
  13. surknight

    Multi_Vendor_Shipping new thread

    Looks like I'll have to debug. What would you recommend for doing that? I tried Xdebug and DBG in N++, but so far that's giving me access denied errors.
  14. surknight

    Multi_Vendor_Shipping new thread

    Has anyone successfully modified FedEx Web Services v9 to work with MVS? I tried, using the instructions supplied in the modules.txt file, but it's not returning quotes. I'd use the Fedex1 module included with MVS (which does work), but I need the ability to select services and add % handling charges for different vendors that the webservices module gives. I did run into some trouble where the instructions say to modify this line: 'cost' => $shipping + MODULE_SHIPPING_change to fedex module_HANDLING))) to 'cost' => $shipping + $handling))); because the first line doesn't exist in the webservices module, but otherwise the instructions were fairly easy to apply. The unmodified webservices module does work with MVS off (cart version 2.3.3), so it's not an issue with the fedex credentials being rejected. Attaching the file I modified in case anyone can spot where it went wrong. fedexwebservices.php
  15. surknight

    Multi_Vendor_Shipping new thread

    Thanks! That'll help me a lot. <== Total php beginner :P
×