PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Code von "adcocktail" in Gambio-Checkout einfügen



yellotux
04.04.2011, 12:20
Hallo an alle!

Ich habe ein Partnerprogramm über adcocktail.com eingerichtet. Nun muss ich den Code in den Checkout einfüge, komme aber mit den Variablen die eingefügt werden müssen nicht zurecht. Wer kann helfen?

So sieht der Code aus

<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=meineNR&lv=0&bestid=???1&wert=???2&beschreibung=">

bei ???1 habe ich $_SESSION['customer_id'] stehen, sicher falsch...
bei ???2 seht $order_values.PRODUCTS_PRICE , sicher der richtige Ansatz.

Aber die Werte werden nicht übergeben. Das ganze habe ich in der checkout_success.php ganz am Schluss stehen (nach ?> , da sonst eine Fehlermeldung kam).

Wer kennt sich aus oder hat einen Tipp?

Viele Grüße
yellotux

Sumsebum
04.04.2011, 16:43
Das was Du dort oben angibst, reicht für eine ordentliche Hilfe nicht aus.

Poste doch bitte mal die Anleitung was Du genau einbauen sollst. Bzw. welche Angaben in dem Bild enthalten sein sollen.

berny
04.04.2011, 21:51
Naja, ich vermute ein ganz einfaches php Problem (die Kristallkugel läßt grüßen).
Wenn du das ganze nach dem ?> stehen hast, wird das der Parser nicht übersetzen.
Die Fehlermeldung kommt, weil vermutlich der String mit ' beginnt, und du damit in der 'customer_id' ein Ende und wieder einen Beginn hast, dieser aber falsch interpretiert wird (customer_id ist kein Platzhalter)

Verwirrt ?

Ok, mal anders:
Wenn du einen String definierst, muß dieser entweder mit ' oder mit " beginnen, und wird mit dem gleichen Zeichen wieder unterbrochen.
zB
echo 'Hallo Welt!';
Wenn jetzt Welt mit $1 definiert ist, würde der richtige Stringaufruf so heißen:
echo 'Hallo '.$1.'!';
Das gleiche gilt auch für " (ich erklär jetzt nicht den Unterschied zwischen ' und ")

Wenn du im String ein ' hast, dieses aber nicht das Ende des Strings, sondern ein Teil des Strings (Zeichen) sein soll, so mußt du es auskommentieren, das geht mit \
zB
Echo "<img width=\"1\" height=\"1\" src=\"Bild.jpg\">";
Sonst glaubt der Parser, dass bei jedem " der String beendet oder begonnen wird, und die Zeichen dazwischen irgenwas bedeuten.
Außerdem fehlt der . bei jedem ", und das würde er auch falsch interpretieren.

Checke deinen Code mal, ich denke, dass dort der Hund begraben liegt.

yellotux
05.04.2011, 09:47
Vielen Dank für die erste Hilfe ;-)

@ Sumsebum
Genau das ist meine Problem, es gibt keine Anleitung nur diesen Code, den ich anpassen muss. Der adcocktail-Support hat auch keine Ahnung und kann keine Frage nicht beantworten. Dort kennt man sich mit PHP nicht aus...

@ berny
Vielen Dank für Deiner ausführlichen Info. Hab es aber trotzdem noch nicht hin bekommen. Hier mal der ganze Code aus der checkout_success.php. Der AD-Code ist ganz unten:

<?php
/* --------------------------------------------------------------
checkout_success.php 2009-12-21 gm
Gambio GmbH
http://www.gambio.de
Copyright (c) 2009 Gambio GmbH
Released under the GNU General Public License
--------------------------------------------------------------
*/
?><?php
/* -----------------------------------------------------------------------------------------
$Id: checkout_success.php 896 2005-04-27 19:22:59Z 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(checkout_success.php,v 1.48 2003/02/17); www.oscommerce.com
(c) 2003 nextcommerce (checkout_success.php,v 1.14 2003/08/17); www.nextcommerce.org

Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contribution:

Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org


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


include ('includes/application_top.php');

$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SUCCESS);
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SUCCESS);

// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');

// if the customer is not logged on, redirect them to the shopping cart page
if (!isset ($_SESSION['customer_id'])) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART) );
}

if (isset ($_GET['action']) && ($_GET['action'] == 'update')) {

if ($_SESSION['account_type'] != 1) {
xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
} else {
xtc_redirect(xtc_href_link(FILENAME_LOGOFF));
}
}

require (DIR_WS_INCLUDES.'header.php');

$orders_query = xtc_db_query("select orders_id, orders_status from ".TABLE_ORDERS." where customers_id = '".$_SESSION['customer_id']."' order by orders_id desc limit 1");
$orders = xtc_db_fetch_array($orders_query);
$last_order = $orders['orders_id'];
$order_status = $orders['orders_status'];

//zmb clickandbuy
// ClickandBuy: Second Confirmation check
if (MODULE_PAYMENT_CLICKANDBUY_V2_SECONDCONFIRMATION_ STATUS == 'true') {
include('ext/clickandbuy/second_confirmation.php');
list($cbsc_status, $cbsc_result) = clickandbuy_second_confirmation($orders['orders_id']);
$smarty->assign('cbsc_status', $cbsc_status);
$smarty->assign('cbsc_result', $cbsc_result);
}
// /ClickandBuy
//zmb clickandbuy end

$smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')));
// BOF GM_MOD:
$smarty->assign('BUTTON_CONTINUE', xtc_image_submit('contgr.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('BUTTON_PRINT', '<img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" style="cursor:hand" onclick="window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER , 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')" />');
$smarty->assign('FORM_END', '</form>');
// GV Code Start
$gv_query = xtc_db_query("select amount from ".TABLE_COUPON_GV_CUSTOMER." where customer_id='".$_SESSION['customer_id']."'");
if ($gv_result = xtc_db_fetch_array($gv_query)) {
if ($gv_result['amount'] > 0) {
$smarty->assign('GV_SEND_LINK', xtc_href_link(FILENAME_GV_SEND));
}
}
// GV Code End
// Google Conversion tracking
if (GOOGLE_CONVERSION == 'true') {
$smarty->assign('google_tracking', 'true');
$smarty->assign('tracking_code', '
<noscript>
<a href="https://services.google.com/sitestats/'.GOOGLE_LANG.'.html" onclick="window.open(this.href); return false;">
<img height=27 width=135 border=0 src="https://www.googleadservices.com/pagead/conversion/'.GOOGLE_CONVERSION_ID.'/?hl='.GOOGLE_LANG.'" />
</a>
</noscript>
');
}

// BOF GM_MOD:

if(gm_is_valid_trusted_shop_id(gm_get_conf('TRUSTE D_SHOP_ID')) == true) {
$trusted_result = xtc_db_query('
SELECT value
FROM orders_total
WHERE
class = "ot_total" AND
orders_id = "'.$orders['orders_id'].'"
');
$trusted_amount = round(mysql_result($trusted_result, 0, 'value'), 2);
//$trusted_amount = mysql_result($trusted_result, 0, 'value');

$trusted_result = xtc_db_query('
SELECT *
FROM orders
WHERE orders_id = "'.$orders['orders_id'].'"
');
$trusted_data = xtc_db_fetch_array($trusted_result);

if($_SESSION['language'] == 1) {
$trusted_block = '
<table width=400 border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="90">
<form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
<input type="image" border="0" src="images/trusted_siegel.gif" title="Trusted Shops seal of approval - Click to verify.">
<input name="shop_id" type="hidden" value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
</form>
</td>
<td align="justify">
<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
<input name="_charset_" type=hidden>
<input name="shop_id" type=hidden value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
<input name="email" type=hidden value="'.$trusted_data['customers_email_address'].'">
<input name="first_name" type=hidden value="'.$trusted_data['customers_firstname'].'">
<input name="last_name" type=hidden value="'.$trusted_data['customers_lastname'].'">
<input name="street" type=hidden value="'.$trusted_data['customers_street_address'].'">
<input name="zip" type=hidden value="'.$trusted_data['customers_postcode'].'">
<input name="city" type=hidden value="'.$trusted_data['customers_city'].'">
<input name="country" type=hidden value="'.$trusted_data['customers_country'].'">
<input name="phone" type=hidden value="'.$trusted_data['customers_telephone'].'">
<input name="amount" type=hidden value="'.$trusted_amount .'">
<input name="curr" type=hidden value="'.$trusted_data['currency'].'">
<input name="KDNR" type=hidden value="'.$trusted_data['customers_cid'].'">
<input name="ORDERNR" type=hidden value="'.$trusted_data['orders_id'].'">

<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#000000">
As a Trusted Shops member, we offer the additional service
of the money-back guarantee backed by the Atradius Insurance
Group. We pay all costs for the guarantee. You only have to
register!<br><br>
</font>
<input type="submit" id="btnProtect" name="btnProtect" value="Register for money-back guarantee...">
</form>
</td>
</tr>
</table>
';
}
else {
$trusted_block = '
<table width=400 border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="90">
<form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
<input type="image" border="0" src="images/trusted_siegel.gif" title="Trusted Shops G&uuml;tesiegel - Bitte hier klicken.">
<input name="shop_id" type="hidden" value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
</form>
</td>
<td align="justify">
<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
<input name="_charset_" type=hidden>
<input name="shop_id" type=hidden value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
<input name="email" type=hidden value="'.$trusted_data['customers_email_address'].'">
<input name="first_name" type=hidden value="'.$trusted_data['customers_firstname'].'">
<input name="last_name" type=hidden value="'.$trusted_data['customers_lastname'].'">
<input name="street" type=hidden value="'.$trusted_data['customers_street_address'].'">
<input name="zip" type=hidden value="'.$trusted_data['customers_postcode'].'">
<input name="city" type=hidden value="'.$trusted_data['customers_city'].'">
<input name="country" type=hidden value="'.$trusted_data['customers_country'].'">
<input name="phone" type=hidden value="'.$trusted_data['customers_telephone'].'">
<input name="amount" type=hidden value="'.$trusted_amount .'">
<input name="curr" type=hidden value="'.$trusted_data['currency'].'">
<input name="KDNR" type=hidden value="'.$trusted_data['customers_cid'].'">
<input name="ORDERNR" type=hidden value="'.$trusted_data['orders_id'].'">

<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#000000">
Als Trusted Shops Mitglied bieten wir Ihnen als
zus&auml;tzlichen Service die Geld-zur&uuml;ck-Garantie
von Trusted Shops. Wir &uuml;bernehmen alle
Kosten dieser Garantie, Sie m&uuml;ssen sich lediglich
anmelden.<br><br>
</font>
<input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zur Geld-zur&uuml;ck-Garantie">
</form>
</td>
</tr>
</table>
';
}
$smarty->assign('TRUSTED_BLOCK', $trusted_block);
}

/* BOF TRUSTED SHOPS RATING */
$obj_widget = new GMTSWidget($_SESSION['languages_id']);
$smarty->assign('TS_RATING', $obj_widget->get_rating_link($last_order, 'GM_TRUSTED_SHOPS_WIDGET_SHOW_CHECKOUT'));
unset($obj_widget);
/* EOF TRUSTED SHOPS RATING */

// BOF GM_MOD
if($_SESSION['nc_checkout_success_info']) {
$smarty->assign('NC_SUCCESS_INFO', $_SESSION['nc_checkout_success_info']);
unset ($_SESSION['nc_paypal_amount']);
unset ($_SESSION['nc_checkout_success_info']);
}

$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));
// EOF GM_MOD

if (DOWNLOAD_ENABLED == 'true')
include (DIR_WS_MODULES.'downloads.php');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content.(isset($_SESSION['xtb2'])?"<div style=\"text-align:center;padding:3px;margin-top:10px;font-weight:bold;\"><a style=\"text-decoration:underline;color:blue;\" href=\"./xtbcallback.php?reverse=true\">Zur&uuml;ck zur xt:booster Auktions&uuml;bersicht..</a></div>":""));

$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');

// adcocktail-Code
<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=196x&lv=0&bestid='$_SESSION.customer_id'&wert='$order_values.PRODUCTS_PRICE'&beschreibung=">

?>


Ich bin mir leider auch nicht sicher, was der Platzhalter für die Kunden-Nummer (hinter bestid=) und für den Gesamtpreis (hinter wert=) sind, und wie ich das interpretiere. (So geht es nicht).

Noch eine Idee?

Grüße
yellotux

Sumsebum
05.04.2011, 13:47
mal so mit der "heissen Nadel" gedacht



...
// adcocktail-Code
<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=196x&lv=0&bestid='$_SESSION.customer_id'&wert='$order_values.PRODUCTS_PRICE'&beschreibung=">

?>


Grunsätzlich hat dieser Code in der checkout_success.php nichts verloren, so wie dort oben schonmal garnicht!!

Das ist ja ein Bildchen was von deren Server nachgeladen wird. Dies sollte eher in die checkout_success.html aus Deinem Templateverzeichnis. => templates/DEIN_TEMPLATE/module/checkout_success.html. Dort an das Ende von allem.
Danach werden die von Dir benötigten Werte entweder aus dem Smarty genommen, oder ich weis nich ob der xtc das auch in der Session mitliefert. Für Smarty einfach am Anfang der Datei ein {debug}, oder die Session mit print_r ausgeben lassen und die entsprechenden Felder für Bestellnummer und Gesamtpreis eintragen ...

Umrühren fertig.

LG

Sum

yellotux
05.04.2011, 15:00
Hallo Sumsebum, Ich habe mit print_r die Sitzung ausgelesen. Demnach sollte es in etwa so aussehen:

<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=1964&lv=0&bestid=[customer_last_name]&wert=[gm_heidelpay]&beschreibung=">

Leider geht es noch nicht (aber es kommt keine Fehlermeldung). Den Code habe ich in der checkout_success.html ins Tamplate geschrieben.

Grüße
yellotux

Merlyn Design
06.04.2011, 00:22
Versuch doch mal das (siehe Ende des Codes):



<?php
/* --------------------------------------------------------------
checkout_success.php 2009-12-21 gm
Gambio GmbH
http://www.gambio.de
Copyright (c) 2009 Gambio GmbH
Released under the GNU General Public License
--------------------------------------------------------------
*/
?><?php
/* -----------------------------------------------------------------------------------------
$Id: checkout_success.php 896 2005-04-27 19:22:59Z 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(checkout_success.php,v 1.48 2003/02/17); www.oscommerce.com
(c) 2003 nextcommerce (checkout_success.php,v 1.14 2003/08/17); www.nextcommerce.org

Released under the GNU General Public License
-----------------------------------------------------------------------------------------
Third Party contribution:

Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
http://www.oscommerce.com/community/contributions,282
Copyright (c) Strider | Strider@oscworks.com
Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
Copyright (c) Andre ambidex@gmx.net
Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org


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


include ('includes/application_top.php');

$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SUCCESS);
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SUCCESS);

// create smarty elements
$smarty = new Smarty;
// include boxes
require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');

// if the customer is not logged on, redirect them to the shopping cart page
if (!isset ($_SESSION['customer_id'])) {
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART) );
}

if (isset ($_GET['action']) && ($_GET['action'] == 'update')) {

if ($_SESSION['account_type'] != 1) {
xtc_redirect(xtc_href_link(FILENAME_DEFAULT));
} else {
xtc_redirect(xtc_href_link(FILENAME_LOGOFF));
}
}

require (DIR_WS_INCLUDES.'header.php');

$orders_query = xtc_db_query("select orders_id, orders_status from ".TABLE_ORDERS." where customers_id = '".$_SESSION['customer_id']."' order by orders_id desc limit 1");
$orders = xtc_db_fetch_array($orders_query);
$last_order = $orders['orders_id'];
$order_status = $orders['orders_status'];

//zmb clickandbuy
// ClickandBuy: Second Confirmation check
if (MODULE_PAYMENT_CLICKANDBUY_V2_SECONDCONFIRMATION_ STATUS == 'true') {
include('ext/clickandbuy/second_confirmation.php');
list($cbsc_status, $cbsc_result) = clickandbuy_second_confirmation($orders['orders_id']);
$smarty->assign('cbsc_status', $cbsc_status);
$smarty->assign('cbsc_result', $cbsc_result);
}
// /ClickandBuy
//zmb clickandbuy end

$smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')));
// BOF GM_MOD:
$smarty->assign('BUTTON_CONTINUE', xtc_image_submit('contgr.gif', IMAGE_BUTTON_CONTINUE));
$smarty->assign('BUTTON_PRINT', '<img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" style="cursor:hand" onclick="window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER , 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')" />');
$smarty->assign('FORM_END', '</form>');
// GV Code Start
$gv_query = xtc_db_query("select amount from ".TABLE_COUPON_GV_CUSTOMER." where customer_id='".$_SESSION['customer_id']."'");
if ($gv_result = xtc_db_fetch_array($gv_query)) {
if ($gv_result['amount'] > 0) {
$smarty->assign('GV_SEND_LINK', xtc_href_link(FILENAME_GV_SEND));
}
}
// GV Code End
// Google Conversion tracking
if (GOOGLE_CONVERSION == 'true') {
$smarty->assign('google_tracking', 'true');
$smarty->assign('tracking_code', '
<noscript>
<a href="https://services.google.com/sitestats/'.GOOGLE_LANG.'.html" onclick="window.open(this.href); return false;">
<img height=27 width=135 border=0 src="https://www.googleadservices.com/pagead/conversion/'.GOOGLE_CONVERSION_ID.'/?hl='.GOOGLE_LANG.'" />
</a>
</noscript>
');
}

// BOF GM_MOD:

if(gm_is_valid_trusted_shop_id(gm_get_conf('TRUSTE D_SHOP_ID')) == true) {
$trusted_result = xtc_db_query('
SELECT value
FROM orders_total
WHERE
class = "ot_total" AND
orders_id = "'.$orders['orders_id'].'"
');
$trusted_amount = round(mysql_result($trusted_result, 0, 'value'), 2);
//$trusted_amount = mysql_result($trusted_result, 0, 'value');

$trusted_result = xtc_db_query('
SELECT *
FROM orders
WHERE orders_id = "'.$orders['orders_id'].'"
');
$trusted_data = xtc_db_fetch_array($trusted_result);

if($_SESSION['language'] == 1) {
$trusted_block = '
<table width=400 border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="90">
<form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
<input type="image" border="0" src="https://ecomservice.interfile.de/images/trusted_siegel.gif" title="Trusted Shops seal of approval - Click to verify.">
<input name="shop_id" type="hidden" value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
</form>
</td>
<td align="justify">
<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
<input name="_charset_" type=hidden>
<input name="shop_id" type=hidden value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
<input name="email" type=hidden value="'.$trusted_data['customers_email_address'].'">
<input name="first_name" type=hidden value="'.$trusted_data['customers_firstname'].'">
<input name="last_name" type=hidden value="'.$trusted_data['customers_lastname'].'">
<input name="street" type=hidden value="'.$trusted_data['customers_street_address'].'">
<input name="zip" type=hidden value="'.$trusted_data['customers_postcode'].'">
<input name="city" type=hidden value="'.$trusted_data['customers_city'].'">
<input name="country" type=hidden value="'.$trusted_data['customers_country'].'">
<input name="phone" type=hidden value="'.$trusted_data['customers_telephone'].'">
<input name="amount" type=hidden value="'.$trusted_amount .'">
<input name="curr" type=hidden value="'.$trusted_data['currency'].'">
<input name="KDNR" type=hidden value="'.$trusted_data['customers_cid'].'">
<input name="ORDERNR" type=hidden value="'.$trusted_data['orders_id'].'">

<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#000000">
As a Trusted Shops member, we offer the additional service
of the money-back guarantee backed by the Atradius Insurance
Group. We pay all costs for the guarantee. You only have to
register!<br><br>
</font>
<input type="submit" id="btnProtect" name="btnProtect" value="Register for money-back guarantee...">
</form>
</td>
</tr>
</table>
';
}
else {
$trusted_block = '
<table width=400 border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="90">
<form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
<input type="image" border="0" src="https://ecomservice.interfile.de/images/trusted_siegel.gif" title="Trusted Shops G&uuml;tesiegel - Bitte hier klicken.">
<input name="shop_id" type="hidden" value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
</form>
</td>
<td align="justify">
<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
<input name="_charset_" type=hidden>
<input name="shop_id" type=hidden value="'.gm_get_conf('TRUSTED_SHOP_ID').'">
<input name="email" type=hidden value="'.$trusted_data['customers_email_address'].'">
<input name="first_name" type=hidden value="'.$trusted_data['customers_firstname'].'">
<input name="last_name" type=hidden value="'.$trusted_data['customers_lastname'].'">
<input name="street" type=hidden value="'.$trusted_data['customers_street_address'].'">
<input name="zip" type=hidden value="'.$trusted_data['customers_postcode'].'">
<input name="city" type=hidden value="'.$trusted_data['customers_city'].'">
<input name="country" type=hidden value="'.$trusted_data['customers_country'].'">
<input name="phone" type=hidden value="'.$trusted_data['customers_telephone'].'">
<input name="amount" type=hidden value="'.$trusted_amount .'">
<input name="curr" type=hidden value="'.$trusted_data['currency'].'">
<input name="KDNR" type=hidden value="'.$trusted_data['customers_cid'].'">
<input name="ORDERNR" type=hidden value="'.$trusted_data['orders_id'].'">

<font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" color="#000000">
Als Trusted Shops Mitglied bieten wir Ihnen als
zus&auml;tzlichen Service die Geld-zur&uuml;ck-Garantie
von Trusted Shops. Wir &uuml;bernehmen alle
Kosten dieser Garantie, Sie m&uuml;ssen sich lediglich
anmelden.<br><br>
</font>
<input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zur Geld-zur&uuml;ck-Garantie">
</form>
</td>
</tr>
</table>
';
}
$smarty->assign('TRUSTED_BLOCK', $trusted_block);
}

/* BOF TRUSTED SHOPS RATING */
$obj_widget = new GMTSWidget($_SESSION['languages_id']);
$smarty->assign('TS_RATING', $obj_widget->get_rating_link($last_order, 'GM_TRUSTED_SHOPS_WIDGET_SHOW_CHECKOUT'));
unset($obj_widget);
/* EOF TRUSTED SHOPS RATING */

// BOF GM_MOD
if($_SESSION['nc_checkout_success_info']) {
$smarty->assign('NC_SUCCESS_INFO', $_SESSION['nc_checkout_success_info']);
unset ($_SESSION['nc_paypal_amount']);
unset ($_SESSION['nc_checkout_success_info']);
}

$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));
// EOF GM_MOD

if (DOWNLOAD_ENABLED == 'true')
include (DIR_WS_MODULES.'downloads.php');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content.(isset($_SESSION['xtb2'])?"<div style=\"text-align:center;padding:3px;margin-top:10px;font-weight:bold;\"><a style=\"text-decoration:underline;color:blue;\" href=\"./xtbcallback.php?reverse=true\">Zur&uuml;ck zur xt:booster Auktions&uuml;bersicht..</a></div>":""));

$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');

// adcocktail-Code

echo '<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=196x&lv=0&bestid=' . $_SESSION.customer_id . '&wert=' . $order_values.PRODUCTS_PRICE . '&beschreibung=">';

?>


Könnte mir vorstellen, das es so gemeint war.

yellotux
06.04.2011, 09:02
Hallo Merlyn, es geht leider nicht so. Wenn ich den Code in die checkout_success.php einfüge, wird bei adcocktail nichts übergeben. Oder muss der Code in die checkout_success.html (also ins Template)? Versuch das mal...

Viele Grüße
Yellotux

yellotux
06.04.2011, 09:24
...nein, geht leider auch nicht.

Sumsebum
06.04.2011, 11:07
Jungs, steht doch oben alles drin.

Yellow ich gehe davon aus das es ein Gambio GX ist

öffne bitte deine checkout_confirmation.php gehe dort an das Ende der Datei und füge VOR


$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_confirmation.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include ('includes/application_bottom.php');
?>


folgenden Code ein:



// ANFANG Werte Adcocktail in SESSION übergeben

$_SESSION['adc_total'] = $order->info['subtotal'];
$_SESSION['adc_cust_id'] = $_SESSION['customer_id'];

// ENDE Werte Adcocktail in SESSION übergeben


es sollte dann so aussehen:



// ANFANG Werte Adcocktail in SESSION übergeben

$_SESSION['adc_total'] = $order->info['subtotal'];
$_SESSION['adc_cust_id'] = $_SESSION['customer_id'];

// ANFANG Werte Adcocktail in SESSION übergeben

$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_confirmation.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include ('includes/application_bottom.php');
?>


Damit ist nun die Zwischensumme (Ohne Versandkosten) und die Kundennummer in der Session als eigenständige Variable vorhanden.

Jetzt öffnest Du Deine checkout_success.php und gehst an das Ende der Datei und fügst VOR


i$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));
// EOF GM_MOD

if (DOWNLOAD_ENABLED == 'true')
include (DIR_WS_MODULES.'downloads.php');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content.(isset($_SESSION['xtb2'])?"<div style=\"text-align:center;padding:3px;margin-top:10px;font-weight:bold;\"><a style=\"text-decoration:underline;color:blue;\" href=\"./xtbcallback.php?reverse=true\">Zur&uuml;ck zur xt:booster Auktions&uuml;bersicht..</a></div>":""));
$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');

folgenden Code ein:


// ANFANG Werte Adcocktail aus SESSION in SMARTY übergeben

$smarty->assign('ADC_TOTAL', $_SESSION['adc_total']);
$smarty->assign('ADC_CUST_ID', $_SESSION['customer_id']);

// ENDE Werte Adcocktail aus SESSION in SMARTY übergeben


Es sollte dann komplett so aussehen:


// ANFANG Werte Adcocktail aus SESSION in SMARTY übergeben

$smarty->assign('ADC_TOTAL', $_SESSION['adc_total']);
$smarty->assign('ADC_CUST_ID', $_SESSION['customer_id']);

// ENDE Werte Adcocktail aus SESSION in SMARTY übergeben

$smarty->assign('LIGHTBOX', gm_get_conf('GM_LIGHTBOX_CHECKOUT'));
// EOF GM_MOD

if (DOWNLOAD_ENABLED == 'true')
include (DIR_WS_MODULES.'downloads.php');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('PAYMENT_BLOCK', $payment_block);
$smarty->caching = 0;

$main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/checkout_success.html');

$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content.(isset($_SESSION['xtb2'])?"<div style=\"text-align:center;padding:3px;margin-top:10px;font-weight:bold;\"><a style=\"text-decoration:underline;color:blue;\" href=\"./xtbcallback.php?reverse=true\">Zur&uuml;ck zur xt:booster Auktions&uuml;bersicht..</a></div>":""));
$smarty->caching = 0;
if (!defined(RM))
$smarty->load_filter('output', 'note');
$smarty->display(CURRENT_TEMPLATE.'/index.html');
include ('includes/application_bottom.php');


Damit sind die Werte für Adcocktail als Smartyvariable {$ADC_CUST_ID} und {$ADC_TOTAL}in der checkout_success.html verfügbar.

jetzt öffnest Du in Deinem Template => /template/DEIN_TEMPLATE/module/checkout_success.html

...um zu prüfen, ob die Werte vorhanden sind einfach in der checkout_success.html ganz oben {debug} reinschreiben, abspeichern hochladen, Bestellung machen und im letzten Fenster öffnet sich dann ein Popup und dort suchst Du mal nach den Variablen ...


und fügst dort deinen Adcoktail Code ein



<img width="1" height="1" src="http://track.adcocktail.com/tracking_sale.php?kid=196x&lv=0&bestid={$ADC_CUST_ID}&wert={$ADC_TOTAL}&beschreibung=">


Das sollte alles gewesen sein, kein Hexenwerk!

Wie immer kann der Code bei Dir etwas anders aussehen, da ich ja nicht weis was Du so alles verbaut hast. Orientiere Dich einfach an dem Beispiel oben.

Allen Angaben ohne Gewähr, der Einbau geschieht auf eigene Gefahr.

Die Rechnung bekommst Du vom Support

LG

Sum

yellotux
06.04.2011, 12:57
Hallo Sumsebum, danke für die Hilfe. Hab alles so eingefügt, wie Du beschrieben hast. Bei einer Test-Bestellung kommt nun:

Parse error: syntax error, unexpected ')', expecting ']' in /var/www/vhosts/linux-market.de/httpdocs/checkout_success.php on line 226

226= $smarty->assign('ADC_TOTAL', $_SESSION['adc_total');

Ich hab Gambio GX v1.0.14c

Was nun?

Grüße
yellotux

Sumsebum
06.04.2011, 13:13
// ANFANG Werte Adcocktail aus SESSION in SMARTY übergeben

$smarty->assign('ADC_TOTAL', $_SESSION['adc_total']);
$smarty->assign('ADC_CUST_ID', $_SESSION['customer_id']);

// ENDE Werte Adcocktail aus SESSION in SMARTY übergeben

da fehlten die schließenden , eckigen Klammern.

Sagt ja auch die Fehlermeldung ...

Sumsebum
06.04.2011, 13:18
ehe ich es vergesse, auch im Erzgebirge sollte man ein RICHTIGES Impressum haben ... !!

yellotux
06.04.2011, 13:32
Es ist kaum zu Glauben, da fehlt doch was.... Danke für den Hinweis. Ist das Impressum jetzt richtig?
Hab den Code abgeändert, jetzt geht es. Vielen Dank noch mal.
Die Werte sind bei ADCocktail auch angekommen.

Grüße
yellotux

Sumsebum
06.04.2011, 13:39
^^
Für die Sachen im Impressum befragst Du mal am Besten einen Anwalt, oder suchst mal im Internet nach "Impressumgenerator" oder ähnlich. Zu diesem Thema bieten wir leider keinen "Vorleseservice" an.

Des weiteren solltest Du Dich allgemein mal mit der Rechtssicherheit deines Shops befassen, da diese Post sehr teuer werden kann.

yellotux
06.04.2011, 13:57
Was meinst du mit "Des weiteren solltest Du Dich allgemein mal mit der Rechtssicherheit deines Shops befassen, da diese Post sehr teuer werden kann." ? Der Shop sollte eigentlich Rechtssicher sein. Bin jetzt etwas irritiert...

Hab das Impressum jetzt mit Impressum Generator für Websites - kostenloses Muster, Vorlage, Beispiel für Homepages (http://www.e-recht24.de/impressum-generator.html) überarbeitet.

KlausK
06.04.2011, 20:26
Das fleissige Arbeiter-Bienchen meint es nur gut mit dir! Höre auf seinen Rat!!!

Das Thema wollen wir zu deinem Schutz auch nicht ausweiten und weiter beim Thema adcocktail bleiben!