Hier meine Lösung für die Anzeige des Grundpreises im Warenkorb, neben dem Produktnamen.
Also:
Krawatte (€ 20.00)
Farbe: Rot (+ € 10.00)
Länge: mittel (+ € 5.00)
Der Grundpreis passt sich der MwSt.-Einstellung an.
Sollte dabei etwas zu viel, zu wenig oder falsch sein, dann bitte um Info.
Wenn jemand in der Lage ist, ähnliche Anzeige des Grundpreises in der Bestätigungs-Mail und in der Bestellverwaltung zu zaubern, wäre ich sehr dankbar.
Dateien:
administrator\components\com_virtuemart\html\basket.php
administrator\components\com_virtuemart\html\ro_basket.php
Den Bereich:
PHP-Code:
// Build URL based on whether item or product
if ($product_parent_id) {
$url = $sess->url(URL . "index.php?page=shop.product_details&flypage=$flypage&product_id=$product_parent_id");
}
else {
$url = $sess->url(URL . "index.php?page=shop.product_details&flypage=$flypage&product_id=" . $_SESSION['cart'][$i]["product_id"]);
}
$product_rows[$i]['product_name'] = "<a href=\"$url\"><strong>"
. $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_name")
. "</strong></a><br />"
. $ps_product->getDescriptionWithTax( $_SESSION['cart'][$i]["description"], $_SESSION['cart'][$i]["product_id"] );
// Display attribute values if this an item
ersetzen durch:
PHP-Code:
// Build URL based on whether item or product
if ($product_parent_id) {
$url = $sess->url(URL . "index.php?page=shop.product_details&flypage=$flypage&product_id=$product_parent_id");
}
else {
$url = $sess->url(URL . "index.php?page=shop.product_details&flypage=$flypage&product_id=" . $_SESSION['cart'][$i]["product_id"]);
}
$my_taxrate = $ps_product->get_product_taxrate($cart[$i]["product_id"], $weight_subtotal);
$tax = $my_taxrate * 100;
$price = $ps_product->get_adjusted_attribute_price($cart[$i]["product_id"]);
if( $auth["show_price_including_tax"] == 1 ) {
$product_grundprice = $price["product_price"] * ($my_taxrate+1);
} else {
$product_grundprice = $price["product_grundprice"];
}
$product_rows[$i]['product_name'] = "<a href=\"$url\"><strong>"
. $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_name")
. " (" . $CURRENCY_DISPLAY->getFullValue($product_grundprice). ")"
. "</strong></a><br />"
. $ps_product->getDescriptionWithTax( $_SESSION['cart'][$i]["description"], $_SESSION['cart'][$i]["product_id"] );
// Display attribute values if this an item
LG
Lesezeichen