Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

benspun

Pioneers
  • Posts

    96
  • Joined

  • Last visited

Posts posted by benspun

  1. Hi,

     

    I use another paypal contribution : paypal IPN 0.981 and would like to use your hack for languages. Do you think you can integrate it on this version as well ?

     

    Thanks

     

    Hi Tomcat,

     

    No, unfortunately it would not work. I looked at the contribution you wrote about (paypal IPN 0.981) and the code of this is very different from the normal PayPal module.

     

    But I located where you could probably modify it to suit your needs:

     

    in /catalog/checkout_paypalipn.php, at line 253:

     

      tep_redirect("https://www.paypal.com/cgi-bin/webscr?cmd=_ext-enter&redirect_cmd=_xclick&business=".MODULE_PAYMENT_PAYPALIPN_ID."&item_name=".urlencode(STORE_NAME)."&item_number=".$insert_id."&currency_code=".$paypal_ipn_currency."&amount=".$paypal_ipn_order_amount."&shipping=".$paypal_ipn_shipping_amount."&tax=".$paypal_ipn_tax_amount."&first_name=".urlencode($order->customer['firstname'])."&last_name=".urlencode($order->customer['lastname'])."&address1=".urlencode($order->customer['street_address'])."&city=".urlencode($order->customer['city'])."&state=".urlencode($order->customer['state'])."&zip=".urlencode($order->customer['postcode'])."&email=".$order->customer['email_address']."&bn=oscommerce-osmosis-0.981&return=".tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')."&cancel_return=".tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')."&notify_url=".MODULE_PAYMENT_PAYPALIPN_NOTIFY_URL);

     

    this is where the url is sent to PayPal.

    So you would need to add this bit of code:

     

    &lc=FR

     

    to have the PayPal page displayed in French, for example.

     

    The "&" always precedes some bit of information send to PayPal, so you just add here another bit of information, which is the default country for your buyer (and PayPal will display the payment page in the language of this country).

     

     

    So you need to add something like this code:

     

    &lc=".urlencode(COUNTRY_LANG)."

     

    into the PayPal URL of your /catalog/checkout_paypalipn.php

     

    Try replacing the line 253 with this line:

      tep_redirect("https://www.paypal.com/cgi-bin/webscr?cmd=_ext-enter&redirect_cmd=_xclick&business=".MODULE_PAYMENT_PAYPALIPN_ID."&item_name=".urlencode(STORE_NAME)."&lc=".urlencode(COUNTRY_LANG)."&item_number=".$insert_id."&currency_code=".$paypal_ipn_currency."&amount=".$paypal_ipn_order_amount."&shipping=".$paypal_ipn_shipping_amount."&tax=".$paypal_ipn_tax_amount."&first_name=".urlencode($order->customer['firstname'])."&last_name=".urlencode($order->customer['lastname'])."&address1=".urlencode($order->customer['street_address'])."&city=".urlencode($order->customer['city'])."&state=".urlencode($order->customer['state'])."&zip=".urlencode($order->customer['postcode'])."&email=".$order->customer['email_address']."&bn=oscommerce-osmosis-0.981&return=".tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')."&cancel_return=".tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')."&notify_url=".MODULE_PAYMENT_PAYPALIPN_NOTIFY_URL);

     

     

    After, add this line:

      define('COUNTRY_LANG', 'US');  // The "ISO 3166-1 alpha-2" country code for a country that has *this* language as their main one, eg:  FR for France (French)

     

    into your languages files, in:

    /catalog/includes/languages/english/english.php and

    /catalog/includes/languages/espanol/espagnol.php and

    etc. (all your language files)

     

    Indeed, you need to modify this last line according to the country which has the language you want. Here is "US", for displaying in English. Use "ES" for Spanish, "FR", for French, etc.

     

     

    I haven't tested this (since I am not using this contribution) but it should work. If it doesn't, look carefully at the URL of the PayPal page to see where is the error.

     

    I hope it can help. Tell me how it goes.

     

    Regards,

     

    -Ben

  2. This is the support topic for "PayPal Payment Page Automatic Language Selection".

     

    The contribution is available at:

     

     

     

    =================================

     

    DESCRIPTION:

     

    This very simple modification allows the PayPal Payment page

    to be displayed in the language selected by the customer on the shop.

    It overrides the default language set up in your PayPal account.

     

    This then permits a truly multilanguage integration of PayPal payments

    into your online shop.

     

    This works for the plain old PayPal payment module that comes by default

    with osCommerce.

     

     

    I had made this for my own needs, since I couldn't find any simple

    contribution that did this. I am aware that there might be a better way

    (codewise) to do this. Please feel free and encouraged to make such a

    better or wiser way, and kindly let me know as well.

     

    ==================================

     

    PROBLEM:

     

    PayPal automaticaly displays the payment page in the language of your

    PayPal account.

    That causes problems if, for example, your PayPal account is in English

    but your shop also has other language(s) than English. You would indeed

    want the PayPal payment page to be displayed in the language your customer

    selected in your shop!

     

     

    SOLUTION:

     

    PayPal accepts that you specify a "buyer's default country" for the payment

    page, and will display the payment page on the language that corresponds to

    this country.

     

    Here you go!

    So if you specify "Spain", the payment page will be in Spanish.

    If you specify "France", the payment page will be in French.

    If you specify "Germany", the payment page will be in German.

    Etc.

     

    You then only need to define a country for each of your language, and have

    osCommerce send this info when the customer clicks "Confirm Order".

     

     

    ==================================

     

    I will do my best to give help, if needed, about this very modest contribution.

     

    Regards,

     

    -Benoit

  3. Do I need something from paypal to use that option in oscommerce on my web site (or at least on the server) if so what is it that I need and where do I need to place it?

     

    Jamie

     

    Hello Jamie,

     

    You only need a PayPal account.

     

    And you put your email address in the admin section of your store, in Modules -> Payment -> PayPal

     

    In your PayPal account, in Profiles -> Instant Payment Notification, Turn the IPN on, and put the correct URL:

    http://your_shop.com/checkout_success.php

     

    That's it.

     

    -Ben

  4. Small announcement:

     

    I've released AllProducts_V_4.4c (Mutlilanguage friendly)

     

    Only a small change compared to the previous version (v4.4b w SQL fix): All Products is now multilanguage friendly.

     

    There is no more English text embedded in the code, but instead some variables in the different language files, which then permits this contribution to fully support different languages.

     

    Nothing else made. Full credit goes to the original authors.

     

    Included in the zip file are the English, French and German versions of All Products.

     

    Regards,

     

    -Ben

  5. I am using the latest osCommerce update (060817) and I would like to use QTP v4.25. I am also using the Register_Globals v1.5 contribution (allowing to turn register_globals off).

     

    There are quite a few in the 060817 update, compared to the previous update, as well as in the Register_Globals contribution, and QTP v4.25 also requires the modification of many files, which makes the integration seemingly a bit long and tedious.

     

    Anybody had tried that, or knows if it conflicts in any way?

     

    Thanks for any help or comment.

     

    Update, for those interested:

    I made the modifications by hand, with file compares between the original osCommerce files and the QTP v4.25 files. It took me quite a few hours, but it works.

     

    So it's possible to do.

  6. I am using the latest osCommerce update (060817) and I would like to use QTP v4.25. I am also using the Register_Globals v1.5 contribution (allowing to turn register_globals off).

     

    There are quite a few in the 060817 update, compared to the previous update, as well as in the Register_Globals contribution, and QTP v4.25 also requires the modification of many files, which makes the integration seemingly a bit long and tedious.

     

    Anybody had tried that, or knows if it conflicts in any way?

     

    Thanks for any help or comment.

  7. OK, I did this and changed the number to 8 and uploaded it again.

     

    Then I go to edit the zones there are still 7 and 3 blank boxes for me to input the required info but they are not labled. I guessed this would be fo the 8th so I've put the info in and submitted but no 8th zone has appeared.

     

    Am I still doing something wrong?

     

    Andrew

     

     

    I had the same problems, I just found out the cause :

     

    You have to click "Remove" and to "Install" this Zone Rates module again after having changed the number of zones in the php file, I guess to create the necessary entries in the SQL database.

×
×
  • Create New...