v2.0.x falscher Preis im Merkzettel

Thema wurde von Tonks, 8. September 2011 erstellt.

  1. C h r i s t i a n

    C h r i s t i a n G-WARD 2012

    Registriert seit:
    26. April 2011
    Beiträge:
    3.456
    Danke erhalten:
    330
    Danke vergeben:
    551
    .....bist du nicht, wäre schön wenns dafür schnellstens einen Fix gibt.
     
  2. Moritz (Gambio)

    Moritz (Gambio) Administrator

    Registriert seit:
    26. April 2011
    Beiträge:
    5.786
    Danke erhalten:
    2.692
    Danke vergeben:
    903
    Hallo,

    hier ein Lösungsvorschlag:

    In der Datei includes/classes/wish_list.php Folgendes
    PHP:
    function attributes_price($products_id) {
            global 
    $xtPrice;
            if (isset(
    $this->contents[$products_id]['attributes'])) {
                
    reset($this->contents[$products_id]['attributes']);
                while (list(
    $option$value) = each($this->contents[$products_id]['attributes'])) {
                    
    $attribute_price_query xtc_db_query("select pd.products_tax_class_id, p.options_values_price, p.price_prefix from " TABLE_PRODUCTS_ATTRIBUTES " p, " TABLE_PRODUCTS " pd where p.products_id = '" $products_id "' and p.options_id = '" $option "' and pd.products_id = p.products_id and p.options_values_id = '" $value "'");
                    
    $attribute_price xtc_db_fetch_array($attribute_price_query);
                    if (
    $attribute_price['price_prefix'] == '+') {

                        
    $attributes_price += $xtPrice->xtcFormat($attribute_price['options_values_price'],false,$attribute_price['products_tax_class_id']);

                    } else {
                        
    $attributes_price -= $xtPrice->xtcFormat($attribute_price['options_values_price'],false,$attribute_price['products_tax_class_id']);
                    }
                }
            }
            return 
    $attributes_price;
        }
    ersetzen durch
    PHP:
    function attributes_price($products_id) {
            global 
    $xtPrice;
            if (isset (
    $this->contents[$products_id]['attributes'])) {
                
    reset($this->contents[$products_id]['attributes']);
                while (list (
    $option$value) = each($this->contents[$products_id]['attributes'])) {

                    
    $values $xtPrice->xtcGetOptionPrice($products_id$option$value);
                    
    $attributes_price += $values['price'];

                }
            }
            return 
    $attributes_price;
        }

    BTW: Danke an die Bug-Entdecker ;) :).
     
  3. Manni_HB

    Manni_HB G-WARD 2012/13/14/15

    Registriert seit:
    26. April 2011
    Beiträge:
    9.098
    Danke erhalten:
    1.540
    Danke vergeben:
    909
    Ort:
    Bremen
    Och Moritz - da nicht für ... für´n "Jever" tun wir alles! :)
    Der Dank liegt ganz bei mir/uns!!!
    Scheint nun auch mit den Rabatten zu funkonopeln (so man sie denn anbietet!!) :)