Info |
---|
Die aktuellste Version des Plugins für xt:Commerce 3.0.4 SP2.1 erhalten Sie direkt von PayPal nach Freischaltung für Ratenkauf |
Installation in xt:Commerce 3.0.4 SP2.1
Datei admin/configuration.php
...
- Sichern Sie Ihre Komplette xt:Commerce 3 Installation und führen Sie eine Installation des Plugins in Ihrem Testsystem durch bevor Sie es in Ihrem Live Shop installieren
- Kopieren Sie bitte die Files aus dem Verzeichnis new_files/ in Ihre xt:Commerce 3 Installation, danach folgen Sie bitte den folgenden Anweisungen zur Anpassung Ihrer Shop-Datein.
Grundsätzlich empfehlen wir dringend ein Update auf xt:Commerce 4 (in kürze xt:Commerce 5).
Untere Anleitung bezieht sich auf eine Installation in eine unveränderte xt:Commerce 3 Installation und originaler xt:Commerce Software, das Gutscheinsystem wir in aktueller Pluginversion nicht untersützt.
Version | Datum | Notiz |
---|
1.0 | 15.09.2016 | Initial Release |
Datei admin/configuration.php
Code Block |
---|
<?php
switch ($_GET['gID']) {
case 21:
echo AFTERBUY_URL;
case 19:
echo '<table class="infoBoxHeading" width="100%">
<tr>
<td width="150" align="center">
<a href="'.xtc_href_link(FILENAME_CONFIGURATION, 'gID=21', 'NONSSL').'">Afterbuy</a>
</td>
<td width="1">|
</td>
<td width="150" align="center">
<a href="'.xtc_href_link(FILENAME_CONFIGURATION, 'gID=19', 'NONSSL').'">Google Conversion</a>
</td>
<td width="1">|
</td>
<td>
</td>
</tr>
</table>';
break;
}
?> |
ersetzen durch:
Code Block |
---|
<?php
switch ($_GET['gID']) {
case 21:
}
?> |
ersetzen durch:
Code Block |
---|
case 19:
case 24:
case 111125:
echo '<table width="100%">
<?php
switch ($_GET['gID']) {<tr class="dataTableHeadingRow">
case 21:
case 19:<td width="150" align="center">
case 24:
case 111125:
<a class="button" href="'.xtc_href_link(FILENAME_CONFIGURATION, 'gID=21', 'NONSSL').'">Afterbuy</a>
echo '<table width="100%">
</td>
<tr<td classwidth="dataTableHeadingRow1">|</td>
<td width="150" align="center">
<a class="button" href="'.xtc_href_link(FILENAME_CONFIGURATION, 'gID=2119', 'NONSSL').'">Afterbuy<>Google Conversion</a>
</td>
<td width="1">|</td>
<td width="150" align="center">
<a class="button" href="'.xtc_href_link(FILENAME_CONFIGURATION, 'gID=19111125', 'NONSSL').'">Google Conversion<>PayPal</a>
</td>
<td width="1">|</td>
<td></td>
</tr>
</table>';
break;
<td width="150" align="center">
}
<a class="button"?> |
Datei admin/includes/column_left.php
Code Block |
---|
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['paypal'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=111125', 'NONSSL').'">PayPal</a>
</td>
<td width="1">|</td>
<td></td>
</tr>
</table>';
break;
}
?> |
Datei admin/includes/column_left.php
Code Block |
---|
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['paypal'] == '1')) echo '<a href="' . xtc_href_link('paypal.php') . '" class="menuBoxContentLink"> -' . BOX_PAYPAL . '</a><br>'; |
Einfügen vor
Code Block |
---|
if (ACTIVATE_GIFT_SYSTEM=='true') { |
Datei admin/includes/application_top.php
1.
Code Block |
---|
define('FILENAME_PAYPAL','paypal.php'); |
Einfügen nach
Code Block |
---|
define('FILENAME_XSELL_GROUPS','cross_sell_groups.php'); |
2.
Code Block |
---|
define('TABLE_PAYPAL', 'paypal');
define('TABLE_PAYPAL_STATUS_HISTORY', 'paypal_status_history'); |
Einfügen nach
Code Block |
---|
define('TABLE_CAMPAIGNS_IP','campaigns_ip'); |
Code Block |
---|
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/module/paypal_ratenkauf/xt_paypal_installments.css'; ?>" /> |
Einfügen nach
Code Block |
---|
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/stylesheet.css'; ?>" /> |
Datei includes/application_top.php
Code Block |
---|
// Paypal:
require_once (DIR_WS_CLASSES.'paypal_checkout.php');
$o_paypal = new paypal_checkout(); |
Einfügen vor
Code Block |
---|
// include the who's online functions
xtc_update_whos_online(); |
Datei includes/application_top_callback.php
Einfügen vor ?>
Code Block |
---|
require (DIR_WS_FUNCTIONS.'sessions.php'); |
Datei includes/database_tables.php
Einfügen vor ?>
Code Block |
---|
// PayPal
define('TABLE_PAYPAL', 'paypal');
define('TABLE_PAYPAL_STATUS_HISTORY', 'paypal_status_history'); |
Datei includes/modules/product_info.php
Code Block |
---|
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$info_smarty->assign('PAYPAL_RATENKAUF_INFO',$ppi->renderRatenkaufInfoBox($products_price['plain'],$_SESSION['currency'],'DE'));
|
Einfügen vor
Code Block |
---|
if ($_SESSION['customers_status']['customers_status_graduated_prices'] == 1)
include (DIR_WS_MODULES.FILENAME_GRADUATED_PRICE); |
Datei shopping_cart.php
Code Block |
---|
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$smarty->assign('PAYPAL_RATENKAUF_INFO',$ppi->renderRatenkaufInfoBox($_SESSION['cart']->show_total(),$_SESSION['currency'],'DE'));
|
Einfügen vor:
Code Block |
---|
// minimum/maximum order value
$checkout = true; |
Datei checkout_payment.php
1.
Code Block |
---|
unset($_SESSION['reshash']);
unset($_SESSION['nvpReqArray']);
unset($_SESSION['PP_RETURN_RATENKAUF']); |
Einfügen vor:
Code Block |
---|
if (ACTIVATE_GIFT_SYSTEM == 'true') {
$smarty->assign('module_gift', $order_total_modules->credit_selection());
} |
2.
Code Block |
---|
if(isset($_SESSION['reshash']['FORMATED_ERRORS'])){
$smarty->assign('error', $_SESSION['reshash']['FORMATED_ERRORS']);
} |
Einfügen vor:
Code Block |
---|
$selection = $payment_modules->selection(); |
Datei checkout_confirmation.php
1.
Code Block |
---|
if($_GET['PayerID']!='' AND $_SESSION['reshash']['TOKEN']!='' AND (strtoupper($_SESSION['reshash']["ACK"])=="SUCCESS" OR strtoupper($_SESSION['reshash']["ACK"])=="SUCCESSWITHWARNING")) {
$_POST['conditions']='1';
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$ppi->paypalGetCustomerData();
} |
Einfügen vor:
Code Block |
---|
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if ($_POST['conditions'] == false) {
$error = str_replace('\n', '<br />', ERROR_CONDITIONS_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($error), 'SSL', true, false));
}
} |
2.
Code Block |
---|
$order_total_modules->process(); |
ändern zu:
Code Block |
---|
$order_totals = $order_total_modules->process(); |
Datei includes/classes/order.php
1.
Code Block |
---|
'paypal.php') . '" class="menuBoxContentLink"> -' . BOX_PAYPAL . '</a><br>'; |
Einfügen vor
Code Block |
---|
if (ACTIVATE_GIFT_SYSTEM=='true') { |
Datei admin/includes/application_top.php
1.
Code Block |
---|
define('FILENAME_PAYPAL','paypal.php'); |
Einfügen nach
Code Block |
---|
define('FILENAME_XSELL_GROUPS','cross_sell_groups.php'); |
2.
Code Block |
---|
define('TABLE_PAYPAL', 'paypal');
define('TABLE_PAYPAL_STATUS_HISTORY', 'paypal_status_history'); |
Einfügen nach
Code Block |
---|
define('TABLE_CAMPAIGNS_IP','campaigns_ip'); |
Code Block |
---|
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/module/paypal_ratenkauf/xt_paypal_installments.css'; ?>" /> |
Einfügen nach
Code Block |
---|
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/stylesheet.css'; ?>" /> |
Datei includes/application_top.php
Code Block |
---|
// Paypal:
require_once (DIR_WS_CLASSES.'paypal_checkout.php');
$o_paypal = new paypal_checkout(); |
Einfügen vor
Code Block |
---|
// include the who's online functions
xtc_update_whos_online(); |
Datei includes/application_top_callback.php
Einfügen vor ?>
Code Block |
---|
require (DIR_WS_FUNCTIONS.'sessions.php'); |
Datei includes/database_tables.php
Einfügen vor ?>
Code Block |
---|
// PayPal
define('TABLE_PAYPAL', 'paypal');
define('TABLE_PAYPAL_STATUS_HISTORY', 'paypal_status_history'); |
Datei includes/modules/product_info.php
Code Block |
---|
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$info_smarty->assign('PAYPAL_RATENKAUF_INFO',$ppi->renderRatenkaufInfoBox($products_price['plain'],$_SESSION['currency'],'DE'));
|
Einfügen vor
Code Block |
---|
if ($_SESSION['customers_status']['customers_status_graduated_prices'] == 1)
include (DIR_WS_MODULES.FILENAME_GRADUATED_PRICE); |
Datei shopping_cart.php
Code Block |
---|
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$smarty->assign('PAYPAL_RATENKAUF_INFO',$ppi->renderRatenkaufInfoBox($_SESSION['cart']->show_total(),$_SESSION['currency'],'DE'));
|
Einfügen vor:
Code Block |
---|
// minimum/maximum order value
$checkout = true; |
Datei checkout_payment.php
1.
Code Block |
---|
unset($_SESSION['reshash']);
unset($_SESSION['nvpReqArray']);
unset($_SESSION['PP_RETURN_RATENKAUF']); |
Einfügen vor:
Code Block |
---|
if (ACTIVATE_GIFT_SYSTEM == 'true') {
$smarty->assign('module_gift', $order_total_modules->credit_selection());
} |
2.
Code Block |
---|
if(isset($_SESSION['reshash']['FORMATED_ERRORS'])){
$smarty->assign('error', $_SESSION['reshash']['FORMATED_ERRORS']);
} |
Einfügen vor:
Code Block |
---|
$selection = $payment_modules->selection(); |
Datei checkout_confirmation.php
1.
Code Block |
---|
if($_GET['PayerID']!='' AND $_SESSION['reshash']['TOKEN']!='' AND (strtoupper($_SESSION['reshash']["ACK"])=="SUCCESS" OR strtoupper($_SESSION['reshash']["ACK"])=="SUCCESSWITHWARNING")) {
$_POST['conditions']='1';
$file = DIR_WS_CLASSES . 'paypal_ratenkauf_api.php';
if (file_exists ( $file )) {
include_once ($file);
}
$ppi = new paypal_ratenkauf_api();
$ppi->paypalGetCustomerData();
} |
Einfügen vor:
Code Block |
---|
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if ($_POST['conditions'] == false) {
$error = str_replace('\n', '<br />', ERROR_CONDITIONS_NOT_ACCEPTED);
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($error), 'SSL', true, false));
}
} |
2.
Code Block |
---|
$order_total_modules->process(); |
ändern zu:
Code Block |
---|
$order_totals = $order_total_modules->process(); |
Datei includes/classes/order.php
1.
Code Block |
---|
$order_total_query = xtc_db_query("select text,value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_total'");
$order_total = xtc_db_fetch_array($order_total_query);
$order_tax_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_tax'");
$order_tax = xtc_db_fetch_array($order_tax_query);
$pp_order_tax=$order_tax['SUM(value)'];
$pp_order_disc=0;
$order_disc_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_discount'");
$order_disc = xtc_db_fetch_array($order_disc_query);
$pp_order_disc+=$order_disc['SUM(value)'];
$pp_order_gs=0;
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_coupon'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_gv'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
/// customers bonus
$order_gs_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_bonus_fee'");
$order_gs = xtc_db_fetch_array($order_gs_query);
$pp_order_gs-=$order_gs['SUM(value)'];
$pp_order_fee=0;
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_payment'");
$order_fee = xtc_db_fetch_array($order_fee_query);
// Rabatt aus Fremd Modul
if($order_fee['SUM(value)'] < 0):
$pp_order_disc+=$order_fee['SUM(value)'];
else:
$pp_order_fee+=$order_fee['SUM(value)'];
endif;
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_cod_fee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_ps_fee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_loworderfee'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_order_fee+=$order_fee['SUM(value)'];
$order_fee_query = xtc_db_query("select SUM(value) from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_paypal_ratenkauf'");
$order_fee = xtc_db_fetch_array($order_fee_query);
$pp_ratenkauf_fee=$order_fee['SUM(value)'];
|
...