#1 (permalink)  
Alt 09.03.2006, 14:43
 
Registriert seit: 15.12.2005
Beiträge: 300
Standard

mein problem war, da? wir einen franz. shop und CC ?ber paypal als zahlung anbieten.
da wir einen deutschen paypal-account haben wird normalerweise die deutsche paypal-seite aufgerufen.
franzosen ohne paypal-account standen dann vor einem sprachr?tzel.
hier die l?sung -

ein hiddenfield mit dem optionswert des landes f?r das paypal formular
Code:
$process_button_string = xtc_draw_hidden_field('cmd', '_xclick') .
 xtc_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
 xtc_draw_hidden_field('item_name', STORE_NAME) .
 xtc_draw_hidden_field('country_code', 'FR') . <-- hier den l?ndercode eintragen

........
hoffe dem einen oder anderen hilfts
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 09.03.2006, 15:47
 
Registriert seit: 15.12.2005
Beiträge: 300
Standard

vielleicht weiss einer den codeschnipsel um "FR" als variable von der L?ndereinstellung des kunden zu generieren.
w?re noch komfortabler...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 23.11.2007, 11:11
Neuer Benutzer
 
Registriert seit: 14.06.2007
Beiträge: 3
Standard hilfe - Paypal Sprache in Fr oder UK

hallo, ich suche und suche finde leider keine antwort. kann mir jemand helfen?
es geht darum das unsere kunden in england und frankreich via zahlungsmodul auf paypal umgeleitet werden, die sprache aber in D ist. das schreckt ab. ich suche seit tagen finde aber nichts dazu...

mein paypal.php code kopiere ich unten, finde aber nichts zur länder/oder sprach einstellung - ich bitte um hilfe! sam

<?php

/* -----------------------------------------------------------------------------------------
$Id: paypal.php 998 2005-07-07 14:18:20Z mz $

XT-Commerce - community made shopping
http://www.xt-commerce.com

Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(paypal.php,v 1.39 2003/01/29); www.oscommerce.com
(c) 2003 nextcommerce (paypal.php,v 1.8 2003/08/24); www.nextcommerce.org

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/

class paypal {
var $code, $title, $description, $enabled;

function paypal() {
global $order;

$this->code = 'paypal';
$this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
$this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_PAYPAL_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
$this->info = MODULE_PAYMENT_PAYPAL_TEXT_INFO;
if ((int) MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
}

if (is_object($order))
$this->update_status();

$this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr';
}

function update_status() {
global $order;

if (($this->enabled == true) && ((int) MODULE_PAYMENT_PAYPAL_ZONE > 0)) {
$check_flag = false;
$check_query = xtc_db_query("select zone_id from ".TABLE_ZONES_TO_GEO_ZONES." where geo_zone_id = '".MODULE_PAYMENT_PAYPAL_ZONE."' and zone_country_id = '".$order->billing['country']['id']."' order by zone_id");
while ($check = xtc_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
}
elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}

if ($check_flag == false) {
$this->enabled = false;
}
}
}

function javascript_validation() {
return false;
}

function selection() {
return array ('id' => $this->code, 'module' => $this->title, 'description' => $this->info);
}

function pre_confirmation_check() {
return false;
}

function confirmation() {
return false;
}

function process_button() {
global $order, $xtPrice;

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
$my_currency = $_SESSION['currency'];
} else {
$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);
}
if (!in_array($my_currency, array ('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
$my_currency = 'EUR';
}

if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$total = $order->info['total'] + $order->info['tax'];
} else {
$total = $order->info['total'];
}
if ($_SESSION['currency'] == $my_currency) {
$amount = round($total, $xtPrice->get_decimal_places($my_currency));
$shipping = round($order->info['shipping_cost'], $xtPrice->get_decimal_places($my_currency));
} else {
$amount = round($xtPrice->xtcCalculateCurrEx($total, $my_currency), $xtPrice->get_decimal_places($my_currency));
$shipping = round($xtPrice->xtcCalculateCurrEx($order->info['shipping_cost'], $my_currency), $xtPrice->get_decimal_places($my_currency));
}
$process_button_string = xtc_draw_hidden_field('cmd', '_xclick').xtc_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID).xtc_draw_hidden_field('i tem_name', STORE_NAME).xtc_draw_hidden_field('amount', $amount - $shipping).xtc_draw_hidden_field('shipping', $shipping).xtc_draw_hidden_field('currency_code', $my_currency).xtc_draw_hidden_field('return', xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')).xtc_draw_hidden_field('cancel_return', xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

return $process_button_string;
}

function before_process() {
return false;
}

function after_process() {
global $insert_id;
if ($this->order_status)
xtc_db_query("UPDATE ".TABLE_ORDERS." SET orders_status='".$this->order_status."' WHERE orders_id='".$insert_id."'");
}

function output_error() {
return false;
}

function check() {
if (!isset ($this->_check)) {
$check_query = xtc_db_query("select configuration_value from ".TABLE_CONFIGURATION." where configuration_key = 'MODULE_PAYMENT_PAYPAL_STATUS'");
$this->_check = xtc_db_num_rows($check_query);
}
return $this->_check;
}

function install() {
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PAYPAL_STATUS', 'True', '6', '3', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PAYPAL_ALLOWED', '', '6', '0', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PAYPAL_ID', 'you@yourbusiness.com', '6', '4', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PAYPAL_CURRENCY', 'Selected Currency', '6', '6', 'xtc_cfg_select_option(array(\'Selected Currency\',\'Only USD\',\'Only CAD\',\'Only EUR\',\'Only GBP\',\'Only JPY\'), ', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PAYPAL_SORT_ORDER', '0', '6', '0', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_PAYMENT_PAYPAL_ZONE', '0', '6', '2', 'xtc_get_zone_class_title', 'xtc_cfg_pull_down_zone_classes(', now())");
xtc_db_query("insert into ".TABLE_CONFIGURATION." ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', '0', '6', '0', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())");
}

function remove() {
xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key in ('".implode("', '", $this->keys())."')");
}

function keys() {
return array ('MODULE_PAYMENT_PAYPAL_STATUS', 'MODULE_PAYMENT_PAYPAL_ALLOWED', 'MODULE_PAYMENT_PAYPAL_ID', 'MODULE_PAYMENT_PAYPAL_CURRENCY', 'MODULE_PAYMENT_PAYPAL_ZONE', 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID', 'MODULE_PAYMENT_PAYPAL_SORT_ORDER');
}
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 09.04.2008, 20:52
Erfahrener Benutzer
 
Registriert seit: 01.03.2007
Beiträge: 122
Standard

Mir fehlt denke ich nicht viel, nachdem sich ausländische, englischsprechende Kunden schon beschwert haben,
Gemäß Paypal Developer Program übergibt man mit lc entweder value"US" für Englisch, "DE" für deutsch usw.

Leider kann ich es nicht testen, da mein OS/browser deutsch sind, kann das jemand mal checken , ob's jetzt besser klappt ??

Ändern in includes/modules/payment/paypal.php
ca. Zeile 115
PHP-Code:
$dataString 'cmd=_xclick&business='.MODULE_PAYMENT_PAYPAL_ID.'&item_name='.STORE_NAME.'-OID:'.$_SESSION['tmp_oID'].'&amount='. ($amount $shipping).'&shipping='.$shipping.'&currency_code='.$my_currency.'&return='.xtc_href_link(FILENAME_CHECKOUT_PROCESS'''SSL').'&cancel_return='.xtc_href_link(FILENAME_CHECKOUT_PAYMENT'''SSL'); 
nach:
PHP-Code:
$dataString 'cmd=_xclick&business='.MODULE_PAYMENT_PAYPAL_ID.&lc='.$_SESSION["language_code"].'&item_name='.STORE_NAME.'-OID:'.$_SESSION['tmp_oID'].'&amount='. ($amount - $shipping).'&shipping='.$shipping.'&currency_code='.$my_currency.'&return='.xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL').'&cancel_return='.xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); 
jetzt müßte die session_language erkannt werden ??

Bitte mal prüfen

danke&gruß sajako
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 23.04.2008, 00:22
xt:Commerce Support Kunde
 
Registriert seit: 19.04.2008
Beiträge: 2
Standard

Das ist echt Mist. Da muss es doch eine Lösung für geben. Ich würde auch auf nur Englisch umstellen. Das versteht wenigsten jeder. Wie kann ich das machen
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 15.07.2008, 15:50
Neuer Benutzer
 
Registriert seit: 14.03.2007
Beiträge: 1
Standard

Um nur auf die englische Seite zu kommen habe ich die lc Variable hier eingesetzt:

paypal.php ca. Zeile 115

$dataString = 'cmd=_xclick&lc=EN&business='.MODULE_PAYMENT_PAYPAL_ID.'&item_name=' .STORE_NAME.'-OID:'.$_SESSION['tmp_oID'].'&amount='. ($amount - $shipping).'&shipping='.$shipping.'&currency_code= '.$my_currency.'&return='.xtc_href_link(FILENAME_C HECKOUT_PROCESS, '', 'SSL').'&cancel_return='.xtc_href_link(FILENAME_CH ECKOUT_PAYMENT, '', 'SSL');

Bei mir funktioniert es (endlich)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 24.08.2009, 13:34
Benutzerbild von dean k.
Benutzer
 
Registriert seit: 18.07.2005
Beiträge: 78
Standard

Hallo,

gibt es eine Möglichkeit das was "Carob" beschrieben hat in eine IF-Anweisung zu setzen, um bei Mehrsprachigen Shops die Variable "lc" zu modifizieren?

Bin auf der Suche nach so einer Lösung, habe hier aber leider noch nichts gefunden?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 24.08.2009, 13:47
Benutzerbild von dean k.
Benutzer
 
Registriert seit: 18.07.2005
Beiträge: 78
Standard

Habe gerade eine Lösung zu meiner Frage entdeckt. Siehe Post: PAYPAL-Zahlung auf Englisch?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
lndereinstellung, paypal

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 01:36 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand