#1 (permalink)  
Alt 25.02.2007, 05:19
Neuer Benutzer
 
Registriert seit: 25.05.2004
Beiträge: 28
Standard array checkout_success

Guten Morgen,

ich brauche für mein Partnerprogramm die Netto-VK-Preise.

Ich habe folgende Abfrage in der checkout_success.php eingebunden:

// get order id
$sql = "select orders_id from ".TABLE_ORDERS." where customers_id='".$_SESSION['customer_id']."' order by orders_id desc limit 1";
$pap_orders_query = xtc_db_query($sql);
$pap_orders = xtc_db_fetch_array($pap_orders_query);
$pap_order_id = $pap_orders['orders_id'];

// get total amount of order
$sql = "select products_price, products_tax, products_quantity from ".TABLE_ORDERS_PRODUCTS." where orders_id='".(int)$pap_order_id."'";
$pap_orders_total_query = xtc_db_query($sql);
$pap_orders_total = xtc_db_fetch_array($pap_orders_total_query);

$affiliate_total = 0;
for ($i=0, $n=sizeof($pap_orders_total); $i<$n; $i++) {
$affiliate_total += (($pap_orders_total[$i]['products_price'] * 100) / (100 + $pap_orders_total[$i]['products_tax'])) * $pap_orders_total[$i]['products_quantity'];
}

Das Problem ist die for-Schleife was muss ich bei sizeof eintragen, kann mir jemand helfen.

Danke

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
array, checkoutsuccess

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


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
"Wer ist Online"Wieso? Fehler: Variable passed to each() is not an array or object... Topis Admininterface 7 08.07.2011 11:55


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:49 Uhr.

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

xt:Commerce is a SafeCharge brand