#1 (permalink)  
Alt 11.07.2006, 12:21
Benutzerbild von leibnitz
Benutzer
 
Registriert seit: 06.10.2005
Beiträge: 35
Standard

Hallo
bekomme immer wenn ich im Adminbereich auf Module -> Zusammenfassung klicke folgenden Fehler

Code:
code = 'ot_coupon'; $this->header = MODULE_ORDER_TOTAL_COUPON_HEADER; $thi>title = MODULE_ORDER_TOTAL_COUPON_TITLE; $this->description = MODULE_ORDER_TOTAL_COUPON_DESCRIPTION; $this->user_prompt = ''; $this->enabled = MODULE_ORDER_TOTAL_COUPON_STATUS; $this->sort_order = MODULE_ORDER_TOTAL_COUPON_SORT_ORDER; $this->include_shipping = MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING; $this->include_tax = MODULE_ORDER_TOTAL_COUPON_INC_TAX; $this->calculate_tax = MODULE_ORDER_TOTAL_COUPON_CALC_TAX; $this->tax_class = MODULE_ORDER_TOTAL_COUPON_TAX_CLASS; $this->credit_class = true; $this->ouut = array (); } function process() { global $order, $xtPrice; $order_total = $this->get_order_total(); $od_amount = $this->calculate_credit($order_total); $tod_amount = 0.0; //Fred $this->deduction = $od_amount; if ($this->calculate_tax != 'None') { //Fred - changed from 'none' to 'None'! $tod_amount = $this->calculate_tax_deduction($order_total, $this->deduction, $this->calculate_tax); } if ($od_amount > 0) { $order->info['total'] = $order->info['total'] - $od_amount; $order->info['deductn'] = $od_amount; $this->output[] = array ('title' => $this->title.':'.$this->coupon_code.':', 'text' => '-'.$xtPrice->xtcFormat($od_amount, true).'', 'value' => $od_amount); //Fred added hyphen } } function selection_test() { return false; } function pre_confirmation_check($order_total) { return $this->calculate_credit($order_total); } function use_credit_amount() { return $output_string; } function credit_selection() { /* $selection_string = ''; $selection_ring .= '' . "\n"; $selection_string .= ' '; $selection_string .= ' '; $selection_string .= ' '; $selection_string .= ' '; $selection_string .= '' . "\n"; */ return false; } function clect_posts() { global $xtPrice; if ($_POST['gv_redeem_code']) { // get some info from the coupon table $coupon_query = xtc_db_query("select coupon_id, coupon_amount, coupon_type, coupon_minimum_order,uses_per_coupon, uses_per_user, restrict_to_products,restrict_to_categories from ".TABLE_COUPONS." where coupon_code='".$_POST['gv_redeem_code']."' and coupon_active='Y'"); $coupon_result = xtc_db_fetch_array($coupon_query); // SS ? if ($coupon_result['coupon_type'] != 'G') { if (xtc_db_num_rows($couponuery) == 0) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_NO_INVALID_REDEEM_COUPON), 'SSL')); } $date_query = xtc_db_query("select coupon_start_date from ".TABLE_COUPONS." where coupon_start_date <= now() and coupon_code='".$_POST['gv_redeem_code']."'"); if (xtc_db_num_rows($date_query) == 0) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_INVALID_STARTDATE_COUPON), 'SSL')); } $date_query = xtc_db_query("seleccoupon_expire_date from ".TABLE_COUPONS." where coupon_expire_date >= now() and coupon_code='".$_POST['gv_redeem_code']."'"); if (xtc_db_num_rows($date_query) == 0) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_INVALID_FINISDATE_COUPON), 'SSL')); } $coupon_count = xtc_db_query("select coupon_id from ".TABLE_COUPON_REDEEM_TRACK." where coupon_id = '".$coupon_result['coupon_id']."'"); $coupon_count_customer = xtc_db_query("select coupon_id from ".TABLE_COUPON_REEM_TRACK." where coupon_id = '".$coupon_result['coupon_id']."' and customer_id = '".$_SESSION['customer_id']."'"); if (xtc_db_num_rows($coupon_count) >= $coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_INVALID_USES_COUPON.$coupon_result['uses_per_coupon'].TIMES), 'SSL')); } if (xtc_db_num_rows($coupon_count_customer) >= $coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_INVALID_USES_USER_COUPON.$coupon_result['uses_per_user'].TIMES), 'SSL')); } if ($coupon_result['coupon_type'] == 'S') { $coupon_amount = $order->info['shipping_cost']; } else { $coupon_amount = $xtPrice->xtcFormat($coupon_result['coupon_amount'], true).' '; } if ($coupon_result['coupon_type'] == 'P') $coupon_amount = $coupon_result['coupon_amount'].'% '; if ($coupon_result['coupon_minimum_order'] 0) $coupon_amount .= 'on orders greater than '.$coupon_result['coupon_minimum_order']; $_SESSION['cc_id'] = $coupon_result['coupon_id']; //Fred ADDED, set the global and session variable } if ($_POST['submit_redeem_coupon_x'] && !$_POST['gv_redeem_code']) xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message='.urlencode(ERROR_NO_REDEEM_CODE), 'SSL')); } } function calculate_credit($amount) { global $order; $od_amount = 0; if (isset ($_SESSION['cc_id'])) { $coupon_query = xtcb_query("select coupon_code from ".TABLE_COUPONS." where coupon_id = '".$_SESSION['cc_id']."'"); if (xtc_db_num_rows($coupon_query) != 0) { $coupon_result = xtc_db_fetch_array($coupon_query); $this->coupon_code = $coupon_result['coupon_code']; $coupon_get = xtc_db_query("select coupon_amount, coupon_minimum_order, restrict_to_products, restrict_to_categories, coupon_type from ".TABLE_COUPONS." where coupon_code = '".$coupon_result['coupon_code']."'"); $get_result = xtc_db_fetch_array($coupon_get); $c_duct = $get_result['coupon_amount']; if ($get_result['coupon_type'] == 'S') $c_deduct = $order->info['shipping_cost']; if ($get_result['coupon_type']=='S' && $get_result['coupon_amount'] > 0 ) $c_deduct = $order->info['shipping_cost'] + $get_result['coupon_amount']; if ($get_result['coupon_minimum_order'] <= $this->get_order_total()) { if ($get_result['restrict_to_products'] || $get_result['restrict_to_categories']) { for ($i = 0; $i < sizeof($order->products); $i ++) { if ($get_result['restrict_to_products']) { $pr_ids = split("[,]", $get_result['restrict_to_products']); for ($ii = 0; $p < count($pr_ids); $ii ++) { if ($pr_ids[$ii] == xtc_get_prid($order->products[$i]['id'])) { if ($get_result['coupon_type'] == 'P') { $od_amount = $amount * $get_result['coupon_amount'] / 100; $pr_c = $this->product_price($pr_ids[$ii]); //Fred 2003-10-28, fix for the row above, otherwise the discount is calc based on price excl VAT! $pod_amount = round($pr_c*10)/10*$c_deduct/100; $od_amount = $od_amount + $pod_amount; } else { $od_amount = $c_deduct; } } } } else { $cat_ids = split("[,]", $get_result['restrict_to_categories']); for ($i = 0; $i < sizeof($order->products); $i ++) { $my_path = xtc_get_product_path(xtc_get_prid($order->products[$i]['id'])); $sub_cat_ids = split("[_]", $my_path); for ($iii = 0; $iii < count($sub_caids); $iii ++) { for ($ii = 0; $ii < count($cat_ids); $ii ++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { if ($get_result['coupon_type'] == 'P') { $pr_c = $this->product_price(xtc_get_prid($order->products[$i]['id'])); //Fred 2003-10-28, fix for the row above, otherwise the discount is calc based on price excl VAT! $pod_amount = round($pr_c*10)/10*$c_deduct/100; $od_amount = $od_amount + $pod_amount; continue 3; // v5.13a Tanaka 2005-4-30: to prevent double counting of a product discount
Kann mir jemand sogaen woran das liegt?

Ich danke im voraus!

MFG

Leibnitz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 11.07.2006, 15:23
Erfahrener Benutzer
 
Registriert seit: 13.01.2006
Beiträge: 109
Standard

Das keine Fehlermeldung sondern bisschen php code,
dein webserver scheint dieses nicht zu verarbeiten sondern nur auszugeben.
kann mehrer ursachen haben zb syntaxfehler, einstellungen webserver....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 13.07.2006, 15:08
Benutzerbild von anniyka
xt:C Sponsor
 
Registriert seit: 28.04.2006
Ort: Nürnberg
Beiträge: 21
Standard

<div class='quotetop'>QUOTE(homer_s @ Jul 11 2006, 04:23 PM) Quoted post</div><div class='quotemain'>
Das keine Fehlermeldung sondern bisschen php code,
dein webserver scheint dieses nicht zu verarbeiten sondern nur auszugeben.
kann mehrer ursachen haben zb syntaxfehler, einstellungen webserver....
[/b][/quote]

Da liegt aber wirklich ein fehler im xtCommerce vor, ich weiss aber nicht genau wo. Ich habe dieses Problem auch und ein Untersuchen der Date ergab, dass z.B. einige Unix-Programme diese Datei als "Bin?rdatei" betrachten. Ursache hierf?r sind zwei ^@ am Zeilenende von Zeile 204 der Datei ot_coupon.php. L?scht man die beiden Controls raus wird die Datei wenigstens wieder als Textdatei gefunden, aber der Fahler beleibt.

Eine ?berpr?fung der zip-Datei (304SP1_package.zip) ergab, dass die Datei schon im Archiv broken ist. Es ist daher ziemlich anzunehmen, dass dort irgendetwas beim Zusammenpacken schiefgelaufen ist.

Das gleiche Problem habe ich bei der Anzeige der Versandkosten (unter dem Preis der Ware auf Versandkosten geklickt.) Leider habe ich da aber noch nicht rausgefunden, welche Datei f?r das Popup zust?ndig ist. In der Titelleiste und im Fenster nur php-code.

irgendwelche L?sungen vorhanden?

liebe gr??e,
anniyka

<div class='quotetop'>QUOTE(anniyka @ Jul 13 2006, 04:04 PM) [post=]Quoted post[/post]</div><div class='quotemain'>
irgendwelche L?sungen vorhanden?

liebe gr??e,
anniyka
[/b][/quote]

Man sollte den richtigen Shop editieren
Also, nachdem ich im RICHTIGEN Shop die beiden Steuerzeichen entfernt habe ging die seite wieder.

Wenn mir noch jemand sagen k?nnte, welche Dateien ich f?r diese Versandkosten editieren muss ... Danke
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 13.07.2006, 15:34
Benutzerbild von anniyka
xt:C Sponsor
 
Registriert seit: 28.04.2006
Ort: Nürnberg
Beiträge: 21
Standard

<div class='quotetop'>QUOTE(anniyka @ Jul 13 2006, 04:08 PM) Quoted post</div><div class='quotemain'>
Wenn mir noch jemand sagen k?nnte, welche Dateien ich f?r diese Versandkosten editieren muss ... Danke
[/b][/quote]

Schon gefunden. popup_content.php, Zeile 35, am Ende auch zwei Steuerzeichen (^@).

Ausserdem:

cross_selling.php: 84, 94, 93 vor dem </td>, 108 vorm </td>, 109 vor dem </td>, 116, 120, 175, 190 vor dem </td>, 195

stats_campaigns.php: 378 und 413

Wenn icht anders angegeben sind es immer 2 ^@ am Zeilenende (Leerzeichen am Zeilende nicht mitgez?hlt).

Ach ja, es l?sst sich unter Linux recht schnell finden, welche Dateien betroffen sind:
Code:
grep -R Id /pfad/zu/xt/* | grep -i Bin | grep php | grep -v \~
vim zeigt die Steuerzeichen Blau und less zeigt sie weiss auf schwarz an.

liebe Gr??e,
anniyka
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
fehler, mei, module, php, zusammenfassung

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



Alle Zeitangaben in WEZ +1. Es ist jetzt 10:39 Uhr.

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

xt:Commerce is a SafeCharge brand