Changes between Initial Version and Version 1 of Ticket #1821


Ignore:
Timestamp:
May 2, 2020, 1:55:19 PM (6 years ago)
Author:
Torsten Riemer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1821 – Description

    initial v1  
    11Von Version 2.0.5.0 zu 2.0.5.1 hat sich die Preisanzeige bei Artikeln mit Optionen ohne Aufpreis dahingehend verändert, dass nun ein "Ab-Preis" angezeigt wird, vergleiche angehängte Screenshots.
     2
     3EDIT: Problem ist klar, siehe Funktion ''checkAttributes()'' in "/includes/classes/xtcPrice.php":
     4
     5'''2.0.5.0:'''
     6{{{
     7  function checkAttributes($pID) {
     8    if (!$this->showFrom_Attributes || $pID == 0) return;
     9   
     10    $pID = $this->priceModules->checkAttributes($pID);
     11   
     12    $products_attributes_query = "SELECT count(*) as total
     13                                    FROM " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
     14                                    JOIN " . TABLE_PRODUCTS_OPTIONS . " popt
     15                                         ON patrib.options_id = popt.products_options_id
     16                                            AND popt.language_id = '" . (int) $_SESSION['languages_id'] . "'
     17                                   WHERE patrib.options_values_price > 0
     18                                     AND patrib.products_id = '" . (int)$pID . "'";
     19    $products_attributes = xtDBquery($products_attributes_query);
     20    if (xtc_db_num_rows($products_attributes, true) > 0) {
     21      $products_attributes = xtc_db_fetch_array($products_attributes, true);
     22      if ($products_attributes['total'] > 0) {
     23        return ' ' . FROM . ' ';
     24      }
     25    }
     26  }
     27}}}
     28'''2.0.5.1:'''
     29{{{
     30  function checkAttributes($pID) {
     31    global $product;
     32   
     33    if (!$this->showFrom_Attributes || $pID == 0) return;
     34   
     35    $pID = $this->priceModules->checkAttributes($pID);
     36    $total = $product->getAttributesCount($pID);
     37   
     38    if ($total > 0) {
     39      return ' ' . FROM . ' ';
     40    }
     41  }
     42}}}
     43Die Funktion checkAttributes() in der Produkt-Klasse unterscheidet sich zur xtcPrice-Klasse dahingehend, dass dort keine Abfrage nach ''WHERE patrib.options_values_price > 0'' enthalten ist.