Hallo,
hab ein seltsames Problem, und zwar in einer Kategorie sind einige Produkte und sobald ein Produkt Staffelpreise hat, dann steht bei allen weiteren Produkten als Preis der billigste Staffelpreis des einen Produktes dort.
Lösch ich die Staffelpreise raus, stimmt alles.
Zu sehen hier:
http://www.huber-schriften.com/onlinesh ... &cPath=65&
Das erste Produkt hat Staffelpreise wobei 51+ Stück 1,68€ kosten und somit sind die Preise aller weiteren Produkte auf der Übersichtsseite mit dem Preis angegeben.
Klickt man auf ein anderes Produkt, so sieht man den richtigen Preis.
Hatte ich sonst noch nie ;(
Gruß Maw
Seltsames Problem mit Staffelpreisen
hallo,
poste bitte einmal den bereich von
aus
~/product_listing.php
cu
ralf
poste bitte einmal den bereich von
Code: Alles auswählen
case 'PRODUCT_LIST_PRICE':
~/product_listing.php
cu
ralf
Hallo Ralf,
folgender Code:
Gruß Marc
folgender Code:
Code: Alles auswählen
case 'PRODUCT_LIST_PRICE':
$lc_align = 'right';
if ( $listing['products_discount4'] > 0 ) {
$price_discount = $oCurrencies->display_price($listing['products_discount4'], oos_get_tax_rate($listing['products_tax_class_id']));
} elseif ( $listing['products_discount3'] > 0 ) {
$price_discount = $oCurrencies->display_price($listing['products_discount3'], oos_get_tax_rate($listing['products_tax_class_id']));
} elseif ( $listing['products_discount2'] > 0 ) {
$price_discount = $oCurrencies->display_price($listing['products_discount2'], oos_get_tax_rate($listing['products_tax_class_id']));
} elseif ( $listing['products_discount1'] > 0 ) {
$price_discount = $oCurrencies->display_price($listing['products_discount1'], oos_get_tax_rate($listing['products_tax_class_id']));
}
$pl_product_price = $oCurrencies->display_price($listing['products_price'], oos_get_tax_rate($listing['products_tax_class_id']));
if (oos_is_not_null($listing['specials_new_products_price'])) {
$pl_special_price = $listing['specials_new_products_price'];
$pl_product_special_price = $oCurrencies->display_price($pl_special_price, oos_get_tax_rate($listing['products_tax_class_id']));
} else {
$pl_max_product_discount = min($listing['products_discount_allowed'],$_SESSION['member']->group['discount']);
if ($pl_max_product_discount != 0 ) {
$pl_special_price = $listing['products_price']*(100-$pl_max_product_discount)/100;
$pl_product_special_price = $oCurrencies->display_price($pl_special_price, oos_get_tax_rate($listing['products_tax_class_id']));
}
}
if ($listing['products_base_price'] != 1) {
$pl_base_product_price = $oCurrencies->display_price($listing['products_price'] * $listing['products_base_price'], oos_get_tax_rate($listing['products_tax_class_id']));
if ($pl_special_price != '') {
$pl_base_product_special_price = $oCurrencies->display_price($pl_special_price * $listing['products_base_price'], oos_get_tax_rate($listing['products_tax_class_id']));
}
}
if (oos_is_not_null($listing['specials_new_products_price'])) {
$lc_text = ' <s>' . $pl_product_price . '</s><br />';
if ($listing['products_base_price'] != 1) $lc_text .= '<s><span class="base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_price . '</span></s><br />';
$lc_text .= ' <span class="special_price">' . $pl_product_special_price . '</span>';
if ($listing['products_base_price'] != 1) $lc_text .= '<br /><span class="special_base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_special_price . '</span></s><br />';
} else {
if ($pl_max_product_discount != 0 ) {
$lc_text = ' <s>' . $pl_product_price . '</s> -' . number_format($pl_max_product_discount, 2) . '%<br />';
$lc_text .= ' <span class="discount_price">' . $pl_product_special_price . '</span>';
if ($listing['products_base_price'] != 1) $lc_text .= '<br /><span class="special_base_price">' . $listing['products_base_unit'] . ' = ' . $pl_base_product_special_price . '</span></s><br />';
} else {
if (isset($price_discount)) {
$lc_text = 'ab ' . $price_discount . '<br />';
} else {
$lc_text = 'ab ' . $pl_product_price . '<br />';
}
}
}
break;
Hallo,
füge zwischen
und
dies ein
solltest du als Anzeige ab 0.00 Euro erhalten, so kannst du evtl. auch unset
http://de.php.net/unset
verwenden
hoffe die Antwort hilft weiter?
cu
ralf
füge zwischen
Code: Alles auswählen
$lc_align = 'right';
Code: Alles auswählen
if ( $listing['products_discount4] > 0 ) {
Code: Alles auswählen
unset ($price_discount);
$price_discount = 0;
$pl_product_price = 0;
$pl_special_price = '';
http://de.php.net/unset
verwenden
Code: Alles auswählen
unset ($price_discount);
unset ($price_discount);
unset ($pl_product_price);
$pl_special_price = '';
cu
ralf