Hallo,
ich habe ein kleines Problem, ich benutze den oscommerce und ändere in jetzt ein wenig um!!
Jetzt gibt es da eine Funktion die den Preis angibt!:
und ich muss diese Formel eibauen:
Wie geht das, ich kenne mich mit funktionen null aus, oder kann man das überhaupt???
PS: Ich habe im Forum von Oscommerce auch schon nachgefragt, hat aber niemand eine Antwort für mich übrig!!
gruß
ich habe ein kleines Problem, ich benutze den oscommerce und ändere in jetzt ein wenig um!!
Jetzt gibt es da eine Funktion die den Preis angibt!:
PHP-Code:
<?php
function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
?>
PHP-Code:
<?php
$preis = $products['products_price'];
$gruppeanfang = tep_db_query("SELECT customers_typ FROM customers WHERE customers_id = '" . $customer_id . "'");
echo mysql_error();
$gruppe_info = tep_db_fetch_array($gruppeanfang);
$gruppe = $gruppe_info['customers_typ']; // Gruppe
$aufschlaganfang = tep_db_query("SELECT p.customers_aufschlag, p.customers_typ, c.customers_id FROM prozent p, customers c WHERE c.customers_typ = p.customers_typ and customers_id = '" . $customer_id . "'");
echo mysql_error();
$aufschlag_info = tep_db_fetch_array($aufschlaganfang);
$aufschlagend = $aufschlag_info['customers_aufschlag']; // Aufschlag
$hun = "100";
$products_aufschlag = $hun + $aufschlagend;
$preiszwei = $preis * $products_aufschlag;
$products_price_zwei = $preiszwei / $hun;
$products_price = $products_price_zwei;
?>
PS: Ich habe im Forum von Oscommerce auch schon nachgefragt, hat aber niemand eine Antwort für mich übrig!!
gruß
Kommentar