Antwort #2 am: 26. März 2011, 09:11:11
liegt an der xtcPrice.php
in der aktuellen version sind einige änderungen gegenüber einer früheren version
(die änderungen dürften bei der letzten downloadversion noch nicht dabei gewesen sein denn sonst hätte ich kein backup der dateien)
alt
// check specialprice
if ($sPrice = $this->xtcCheckSpecial($pID, $qty)) {
return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice['special'], $products_tax), $this->xtcAddTax($sPrice['normal'], $products_tax), $format, $vpeStatus, $this->xtcAddTax($sPrice['lowest'], $products_tax), $this->xtcAddTax($sPrice['highest'], $products_tax));
}
neu
// check specialprice
if ($sPrice = $this->xtcCheckSpecial($pID))
return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus);
function xtcCheckSpecial
alt
function xtcCheckSpecial
($pID, $qty) { if ($this->cStatus['customers_status_graduated_prices'] == '1') { $status_query = xtc_db_query
("SELECT specials_id FROM " . TABLE_SPECIALS
. " WHERE products_id=" . (int
)$pID . " AND status=1"); if (xtc_db_num_rows
($status_query)> 0) { $graduated_price_query = "SELECT quantity as qty,
personal_offer,
special_offer
FROM ".TABLE_PERSONAL_OFFERS_BY
.$this->actualGroup."
WHERE products_id=" . (int
)$pID . "
AND special_offer> 0.0
ORDER BY quantity DESC"; $graduated_price_query = xtDBquery
($graduated_price_query); if (xtc_db_num_rows
($graduated_price_query)) { $i = 0; $lowestPrice = 0.00; $highestPrice = 0.00; $sPrice = 0.00; while ($graduated_price_data = xtc_db_fetch_array
($graduated_price_query, true)) { if ($i++ == 0 && $graduated_price_data['qty']> 1) { $lowestPrice = $graduated_price_data['special_offer']; } if ($sPrice == 0.00 && $graduated_price_data['qty'] <= $qty) { $sPrice = $graduated_price_data['special_offer']; $pPrice = $graduated_price_data['personal_offer']; } $highestPrice = $graduated_price_data['special_offer']; } if ($sPrice != 0.00 ) return array('special' => $sPrice, 'lowest' => $lowestPrice, 'highest' => $highestPrice, 'normal' => $pPrice); } } else { return false; } } $product_query = "select specials_new_products_price from ".TABLE_SPECIALS
." where products_id = " . (int
)$pID . " and status=1"; $product_query = xtDBquery
($product_query); $product = xtc_db_fetch_array
($product_query, true); if ($product['specials_new_products_price'] == 0) return false; return array('normal' => $product['specials_new_products_price'], 'lowest' => 0, 'highest' => 0); } neu
function xtcCheckSpecial($pID) {
$product_query = "select specials_new_products_price from ".TABLE_SPECIALS." where products_id = '".$pID."' and status=1";
$product_query = xtDBquery($product_query);
$product = xtc_db_fetch_array($product_query, true);
return $product['specials_new_products_price'];
}
function xtcFormatSpecial
alt
function xtcFormatSpecial
($pID, $sPrice, $pPrice, $format, $vpeStatus = 0, $lowest = 0, $highest = 0) { if ($discount = $this->xtcCheckDiscount($pID)) { $sPrice -= $sPrice / 100 * $discount; $lowest -= $lowest / 100 * $discount; $highest -= $highest / 100 * $discount; } if ($format) { if ($lowest == 0) { $price = '<span class="productOldPrice">'.INSTEAD
.$this->xtcFormat($pPrice, $format).'</span><br />'.ONLY
.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format); } else { $sPrice = $lowest; $price = '<span class="productOldPrice">'.INSTEAD
.$this->xtcFormat($pPrice, $format).'</span><br />'.NOW
.FROM
.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format); } if ($vpeStatus == 0) { return $price; } else { return array ('formated' => $price, 'plain' => $sPrice); } } else { return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']); } } neu
function xtcFormatSpecial
($pID, $sPrice, $pPrice, $format, $vpeStatus = 0) { if ($format) {//BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest! //$price = '<span class="productOldPrice">'.INSTEAD.$this->xtcFormat($pPrice, $format).'</span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format); //BOF - vr - 2009-12-11 avoid div / 0 if product price is 0 if (!isset($pPrice) || $pPrice == 0) $discount = 0; else $discount = ($pPrice - $sPrice) / $pPrice * 100; $price = '<span class="productOldPrice"><small>'.INSTEAD
.'</small><del>'.$this->xtcFormat($pPrice, $format).'</del></span><br />'.ONLY
.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format).'<br /><small>'.YOU_SAVE
.round($discount).' % /'.$this->xtcFormat($pPrice-$sPrice, $format).'</small>'; //BOF - vr - 2009-12-11 avoid div / 0 if product price is 0//EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest! if ($vpeStatus == 0) { return $price; } else { return array ('formated' => $price, 'plain' => $sPrice); } } else { return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']); } } bei der alten version verschwindet die anzeige " Sie sparen ..."
wo genau der fehler liegt kann ich gerade nicht sagen da ich krank bin und null energie habe und mein hirn dementsprechend null leistet.
bitte danke um hilfe
l.g. Alex