Vollständige Preisanzeige


2840
Der Preis wird inkl. sowie Exkl. MwSt angezeigt. Vor dem Preis wird zusätzlich ein icon angezeigt, sobald sich das Produkt im Warenkorb befindet.

Voraussätzung für diese Erweiterung ist das Addon "[Ajax-Attribut Preisänderung 1.3]".

Öffnen Sie die Seite: catalog/ajax_onchange_price.php und ersetzen den ganzen quellcode.
<?php
require('includes/application_top.php');
$oscTemplate->buildBlocks();
    $optionid            = explode(",",$_GET['option_id']);
    $product_id          = $_GET['product_id'];    
    $product_opt         = explode(",",$_GET['product_opt']);
    $modified_price      = $_GET['price'];
    $sp_price            = $_GET['sp_price'];
    $modified_netto_price = isset($_GET['specials_new_products_price']);
    
    $product_info_query = tep_db_query("select p.products_id, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$product_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info_ajx = tep_db_fetch_array($product_info_query);
    
    $new_price = tep_get_products_special_price($product_info_ajx['products_id']);
    
    for($k=0; $k<count($optionid); $k++)
    {

    $product_new_price_query = tep_db_query("select * from " .TABLE_PRODUCTS_ATTRIBUTES. " where products_id = '" . (int)$product_id . "' and options_id = '".$optionid[$k]."' AND options_values_id ='" . $product_opt[$k] . "'");    
    $product_new_price = tep_db_fetch_array($product_new_price_query);

    $sp_price = $sp_price + ($product_new_price['price_prefix'] . $product_new_price['options_values_price']); // specials
    $modified_price = $modified_price + ($product_new_price['price_prefix'] . $product_new_price['options_values_price']);

    $modified_netto_price = $modified_netto_price + ($product_new_price['price_prefix'] . $product_new_price['options_values_price']); // specials

$special_products_price_query = tep_db_query("select s.specials_new_products_price, p.products_id from " . TABLE_SPECIALS . " s left join " . TABLE_PRODUCTS . " p on s.products_id = p.products_id where s.products_id = '" . (int)$product_id . "'");
$special_products_price = tep_db_fetch_array($special_products_price_query);

$special_n_price = '';
$special_npp_price = '';

$special_n_price = (isset($special_products_price['specials_new_products_price']) ? $special_products_price['specials_new_products_price'] : '');

if (tep_has_product_attributes((isset($special_products_price['products_id']) ? $special_products_price['products_id'] : '') )) {
$special_npp_price = $special_n_price + $modified_netto_price;
}else{
$special_npp_price = $special_n_price;
}
}

// Item in cart start
if ( SHOW_ITEM_IN_CART == 'True' ) {
$products = $cart->get_products();
$in_cart = '';
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$first = current(explode("{", $products[$i]['id']));
if ($first == $product_info_ajx['products_id']) {
$in_cart = '<i class="fa fa-cart-plus"></i> ';
}}}
// Item in cart ende

    if ($new_price = tep_get_products_special_price($product_info_ajx['products_id'])) {
if (SHOW_PRODUCT_NETT_PRICE_ABOWE_PRICE == 'True') {
      $products_price = '<div><span class="w3-small w3-text-gray"> ( ';
      $products_price .= $currencies->display_price($special_npp_price, '');
      $products_price .= TAX_INFO_OFF . ' )</span></div>';
      $products_price .= $in_cart . '<s class="w3-text-red">' . $currencies->display_price($modified_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id'])) . '</s>';
      $products_price .= '<span class="productSpecialPrice">' . $currencies->display_price($sp_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id'])) . '</span>';
}else{
      $products_price = $in_cart . '<s class="w3-text-red">' . $currencies->display_price($modified_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id'])) . '</s>';
      $products_price .= '<span class="productSpecialPrice">' . $currencies->display_price($sp_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id'])) . '</span>';
}


    } else {
if (SHOW_PRODUCT_NETT_PRICE_ABOWE_PRICE == 'True') {
      $products_price = '<div><span class="w3-small w3-text-gray"> ( ';
      $products_price .= $currencies->display_price($modified_price, '');
      $products_price .= TAX_INFO_OFF . ' )</span></div>';
      $products_price .= $in_cart . $currencies->display_price($modified_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id']));
}else{
      $products_price = $in_cart . $currencies->display_price($modified_price, tep_get_tax_rate($product_info_ajx['products_tax_class_id']));
}
    }    

    $s_simbol = array("?", "$", "?");
    $s_entidad = array("€", "$", "£");
    
    echo str_replace($s_simbol, $s_entidad, $products_price); // cambia el simbolo por la entidad html.
?>

Füge hinzu in: catalog/includes/languages/german.php

define('TEXT_INCL_VAT', 'Preis inkl. %s MwSt.');
define('TEXT_SC_INCL_VAT', 'Inkl. %s MwSt.');
define('TEXT_EXCL_VAT', 'exkl. MwSt. § 19 UStG.');
define('TEXT_VAT', 'MwSt.');
define('TAX_INFO', ' inkl. MwSt.');
define('TAX_INFO_OFF', ' exkl. MwSt.');
define('TAX_LF_INFO', 'inkl.');

SQL-Anweisung mittels PhpMyAdmin einspielen:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES ('Produkt im Warenkorb beim Preis anzeigen ?', 'SHOW_ITEM_IN_CART', 'True', 'Möchten Sie, dass der Vermerk Bereits im Warenkorb beim Preis angezeigt wird ?', '1', '205', now(), NULL , 'tep_cfg_select_option(array('True', 'False'),');

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function)
VALUES ('Nettopreis anzeigen ?', 'SHOW_PRODUCT_NETT_PRICE_ABOWE_PRICE', 'True', 'Möchten Sie, dass der Nettopreis über dem Hauptpreis angezeigt wird ?', '1', '206', now(), NULL , 'tep_cfg_select_option(array('True', 'False'),');

In der Administration unter Konfiguration -> My Store, finden Sie jetzt die Einstellmöglichkeiten zu Anzeige.


Informationen(1)
Allgemeine Infos
 Lazy Loading
Beitragszähler
Momentaner Informationsstand:
Kategorien gesamt: 8
Beiträge gesamt: 104
Supportseiten gesamt: 51
Downloads für Mitglieder: 104
Download Zähler: 646