Jump to content


  • Content count

  • Joined

  • Last visited

Posts posted by nanonanouk

  1. Many thanks Robert that did the job!! :)


    No more error log entries, I always start panicking when I see an error log on the server!



    Hi Scott


    Well it is not an error to be fixed to be honest .. MSN has tried to access robots.txt via an odd and incorrect querystring.


    Usu_Categories.php is currently set to trigger an E_USER_WARNING if cPath is passed an invalid parameter, and in this case, it is invalid, therefore the E_USER_WARNING is output.


    I suppose if you wanted to suppress this error you could replace . .


           trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
          return false;


    With ..


           if ( false === headers_sent() ) {
            header("HTTP/1.0 404 Not Found");
            include_once usu::$usuPath . 'includes' . DIRECTORY_SEPARATOR . 'notfound_404.php';
          //trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
          return false;

  2. Hi Robert,


    I've had the contribution running for a few weeks now and it's working great :)


    Today I noticed some errors in the php error_log file on our server.


    Looking at the logs it appears to be a problem if the cPath specified contains non-numeric characters.


    [07-Nov-2009 17:12:30] PHP Warning: Usu_Categories Incorrect cPath presented: 67robotstxt in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php on line 153

    [07-Nov-2009 17:12:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php:153) in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 252

    [07-Nov-2009 17:12:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php:153) in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/includes/notfound_404.php on line 22


    This is from the servers access log.

  - - [07/Nov/2009:17:12:30 -0600] "GET /index.php?cPath=67/robots.txt HTTP/1.1" 200 1532 "-" "msnbot/2.0b (+http://search.msn.com/msnbot.htm)"


    I realise these are not valid URLs, but wondered if there's a way this error could be fixed?


    Kind regards


  3. Thanks for the reply.


    I had the same seo duplicates problem with regular URLs







    all pointing to the same page but different URLs to google. The solution i found was to set a "noindex, follow"

    meta tag if cPath was present. that way the only page to get indexed by google was the one without cPath. This

    is also the format of the URL which appears in my google sitemap and it works fine.


    With seo urls it should be possible to do the same thing by turning on the cPath in the config.

    i've found that i already need to do this since without it the site seems to loose the breadcrumb regarding which

    category the customer is viewing the product in.


    I think it would be a nice option to be able to include the category in the URL :) but to make the shop owner aware of the duplicates issue

    or maybe try and include the "noindex, follow" tag setting to prevent the duplicates.


    Many thanks for your time.

    Kind regards



    Hi Scott


    Thanks for the feedback and glad you like it.


    I had considered adding the option of the category name before the product name but it holds seo penalties, I'll explain.


    As you mentioned ..


    a single product can belong to multiple categories


    This could lead to several urls all pointing to the same product/content .. e.g.








    This unfortunately is duplicate content.

  4. Hi,


    Many thanks for this great SEO URLs contribution, I've been wanting to add one of these modules to our store

    for a while but didn't know which of the contributions to choose!


    This one turned out to be really simple to install and works great! :)


    I was wondering how easy it would be to also include the category (also possibly the category parent) in

    the products URL along with product name? For our site it's the category name which is more keyword

    rich then the product itself so this would be a really useful feature.


    I guess the only problem is with making the URL too long, and also that a single product can belong

    to multiple categories. Has anyone managed to do this?


    Thanks again for all your great work!


    Kind regards



    ULTIMATE Seo Urls 5

    by FWR Media


    New - Modern - More Efficient - Faster - Compatible - Less Queries


    Author: Robert Fisher - www.fwrmedia.co.uk

    Thanks to the beta testers:

    Tom Hodges-Hoyland, Jan Zonjee, toyicebear, GLCustoms



    Server: *nix or Windows/IIS


    PHP requirements:

    Version: 5.2.0+ (actually 5.1.3+ I believe at time of launch)



    SPL (Standard PHP Library)


    Traditional Rewrite URIs require:

    *nix server (Windows/IIS does not have mod_rewrite)

    mod_rewrite (as part of the apache build)

    AllowOveride All (php.ini setting)



    MySQL 5 (Strict Trans Tables)

    Traditional rewrite uris (*nix) produce exactly the same uris as the old 2 series (assuming the same settings)

    The above means that should you upgrade from 2 series you don't have to worry about changed links

    Installation difficulty:

    There are only eight small changes to just seven files so this is easy and quick. (2 minute "drop on top" install for devs/testers)

    Simple database installer.


    Upgrade from old series 2 seo urls:

    Upgrade instructions included.

    Removal script for old database entries.

    Simple database installer.



    Works on Windows/IIS (BETA at time of launch due to lack of extensive testing)

    Two seo uri choices .. standard and rewrite .. Windows/IIS can only use standard

    error free - error_reporting(E_ALL | E_STRICT)

    Modular design

    Plug in modules for contributions

    Simple database installer

    Inbuilt uri validation

    301 redirects

    Custom 404 Page not found

    Zero queries or database use after cache fully loaded

    Cache saving is sequential rather than one big DB hit

    Admin selectable debug output

    File (array) based character conversion (BETA at time of launch)

    Simple cache life in admin based on "cache days"

    Extensive security measures to safeguard the querystring

    Series 2 database removal tool

    Ability to switch between uri types via admin without changing any code as below:

    On: standard seo uris - rewrite seo uris

    Off: standard osC uris - experimental search engine safe uris


    Included Modules:




    Popup image


    Included contribution modules (ALPHA at time of release as untested):

    Information Pages

    Articles, Article Info


    Newsdesk Index, Newsdesk Info, Newsdesk Reviews Info, Newsdesk Reviews Article


    Features Removed (from old 2 series):

    Page cache compatibility - the original author suggests that this should not be installed.


    The contribution can be found at: -



  5. I recently integrated the PayPal Website Payments Pro v1.0.4 contribution into an osCommerce 2.2 rc2a site and thought I’d share my experiences.


    I did a lot of testing and found a number issues which needed fixing before the site could go live. The site primarily sells virtual products and uses PayPal UK which might explain why I had problems.


    Some changes are bug fixes and others are enhancements, if other users are experiencing the same problems then you might find these changes useful or perhaps they can be improved upon and added to the contribution in a future version?


    I also wanted to list some issues I found which I was not able to fix. It would be good to capture these in the TODO list in case someone else fancies a go at fixing them.


    The site has been running reliably for a number of months with both Direct and Express Payments working great!


    I’m in the process of integrating v1.0.5 and v1.0.6 into the site and so far to my knowledge these same issues exist, will post a future update on this.


    Thanks for all the time and effort made by all the osCommerce contributors!


    Kind regards





    1. If a shopping cart contains only virtual products we still need to pass a Shipping Address to PayPal otherwise the Billing Address will be returned as blank to osCommerce when using Express Checkout with Address Override or for using Automatic Account Creation.


    This happens because PayPal never returns any address if a shipping address is not provided in the ExpessCheckout request.


    Modify catalog/includes/modules/payment/paypal_wpp.php


    FIND these lines of code around line 592:


           Check that the word "virtual" is in the content_type property instead 
           of checking that it *is* set to "virtual" because there's another
           popular contribution that modifies the actual field.
         if (strpos($order->content_type,'virtual') !== false) {
           $order_info['PAYPAL_NO_SHIPPING'] = '1';
         } else {
           $order_info['PAYPAL_NO_SHIPPING'] = '0';
        /* If the address in the database should be used, only set 
            PAYPAL_ADDRESS_OVERRIDE to '1' if the user is logged in
            and this is a physical purchase.  If we find out later
            that they have an account, the address will be switched
            once they return.
             $order_info['PAYPAL_NO_SHIPPING'] == '0' && 
             tep_session_is_registered('customer_first_name') && 
             tep_session_is_registered('customer_id') && 
             $order->delivery['street_address'] != '' && 
             $order->delivery['state'] != '') 


    REPLACE with this code below:


          $order_info['PAYPAL_NO_SHIPPING'] = '0';
         /* If the address in the database should be used, only set 
            PAYPAL_ADDRESS_OVERRIDE to '1' if the user is logged in
            and this is a physical purchase.  If we find out later
            that they have an account, the address will be switched
            once they return.
             strpos($order->content_type,'virtual') === false &&
             tep_session_is_registered('customer_first_name') && 
             tep_session_is_registered('customer_id') && 
             $order->delivery['street_address'] != '' && 
             $order->delivery['state'] != '') 


    2. Allow customers to enter spaces in credit cards numbers. Some customers type the number as it appears on the card with spaces between the 4 digit blocks. I didn’t want the customer to have to enter the details again and risk losing a sale.


    Modify catalog/includes/modules/payment/paypal_wpp.php


    FIND these lines of code around line 193:


    } else {
      require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'cc_validation.php');


    and REPLACE with this code below:


    } else {	
      $_POST['paypalwpp_cc_number'] = preg_replace('/[^0-9]/i', '', $_POST['paypalwpp_cc_number']);
      require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'cc_validation.php');


    3. Allow Direct Payment using the customers selected currency (assuming this currency is supported by PayPal). This is instead of forcing the checkout into a default currency.


    I think it’s better if the sales invoice and the PayPal Receipt or Credit Card statement are in the same currency to avoid discrepancies in prices due to exchange rates.


    Ideally the Module Admin should also be updated to make this configurable via the “Transaction Currency”. At the moment it’s hardcoded to always use the stores currency where possible.


    Modify catalog/includes/modules/payment/paypal_wpp.php


    REPLACE wpp_get_currency function with the code below:


    function wpp_get_currency() {
         global $currency;
         switch ($currency) {
           case 'AUD':
           case 'CAD':
           case 'EUR':
           case 'GBP':
           case 'JPY':
           case 'USD':
             $my_currency = $currency; 
             $my_currency = MODULE_PAYMENT_PAYPAL_DP_CURRENCY;
         return $my_currency;




    1. Order Total Discrepancy = $0.00 sometimes appears in the invoices when a customer purchases multiple products. I have been unable to understand why this is happening, the code appears to be checking for this condition.


    2. Refunds fail for Express Checkout transactions which are not in the default currency. I had a look at fixing this but it is not straight forward. The refund amount returned from PayPal is in the checkout currency but osCommerce needs to use the default currency, if the exchange rates change then it could result in the order total not being set to zero.


    3. Changing the Order Status when Refunding is not updating the order_status in TABLE_ORDERS, this remains the same even though TABLE_ORDERS_STATUS_HISTORY has been updated. This can be manually updated via the order details page. I was not sure if this was intentional but would be a useful improvement in a future version as this is the status which is displayed to the customer on the account_history_info page.

  6. hi,


    i'm trying to integrate version 1.0.3 of Paypal WPP into osCommerce 2.2-MS2.


    i found a bug that when using Express Checkout for a shopping cart that contains only "virtual" (i.e. downloadable) items the billing address is left blank instead of being populated by the response from PayPal. It works fine if the cart is a mixture or non-virtual, both the shipping and billing address are correctly populated but not if only a billing address is used.


    looking at the code in /catalog/includes/modules/payment/paypal_wpp.php i noticed on line 587 this.


    if (strpos($order->content_type,'virtual') !== false) {


    i am not familar with the !== operator so changed it to a != and it fixed the problem.


    i noticed there are several places in the code where the !== and === operators are used, please can someone tell me if these are correct and if my "fix" is correct or not?


    kind regards