möchte mit 1.0.8 folgendes realisieren und bekomme es nur zur hälfte hin:
In den Kundengruppen gibt es die Möglichkeit auf den gesamten Warenkorb einen Rabatt einzustellen. Nun möchte ich das zwischen zwei Datumsangaben schalten können bzw. nur für einen Tag.
Ich brauche das nicht im Backend - mir reicht es wenn ich die notwendigen PHP-Files modifziere und die Anfangs- und Enddatum per include reinhole (zum einfachen ändern später).
habe mich mal an der order_details_cart.php versucht - Rabatt wird nicht berechnet bei Datum innerhalb Interval. - Nur - Mein Problem ist nun:
- Die Mwst wird falsch berechnet: d.h. sie wird immer vom Rabattierten Preis berechnet. hab nicht gefunden wo man hier auch noch die If-Anweisung plazieren könnte
- Wir haben eine Kundengruppe die immer 5% Rabatt bekommt. Nun wäre es so, dass wenn das jeweilige Datum nicht innerhalb des Intervalls ist wird hier auch für dies Gruppe der Rabatt nicht berechnet.
Code: Alles auswählen
$total_content = array();
$total = $_SESSION['cart'] -> show_total();
// -------------------------------------------
$from = "26.09.2014";
$to = "26.09.2014";
$now = date("d.m.Y");
//if($from <= $now && $to >= $now) {
// -------------------------------------------
if ( $_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1'
&& $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 0
&& $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$price = $total-$_SESSION['cart'] -> show_tax(false);
} else {
$price = $total;
}
$discount = $xtPrice -> xtcGetDC($price, $_SESSION['customers_status']['customers_status_ot_discount']);
$total_content['discount_rate'] = $_SESSION['customers_status']['customers_status_ot_discount'] . '%';
$total_content['discount_value'] = xtc_format_price($discount, $price_special = 1, $calculate_currencies = false);
}
// -------------------------------------------
//}
// -------------------------------------------
if ( $_SESSION['customers_status']['customers_status_show_price'] == '1' ) {
// -------------------------------------------
// if($from <= $now && $to >= $now) {
// -------------------------------------------
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 0
&& $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0 ) {
$total -= $discount;
}
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 0
&& $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1 ) {
$total -= $discount;
}
if ( $_SESSION['customers_status']['customers_status_show_price_tax'] == 1 ) {
$total -= $discount;
}
// -------------------------------------------
}
// -------------------------------------------
Kann mir hier jemand weiterhelfen - Evtl. bin ich auch in der falschen PHP-Datei unterwegs.
Danke im Voraus!
Helmut