Opened 6 years ago

Last modified 6 years ago

#1821 closed Bug/Fehler

Artikel mit Optionen ohne Aufpreis zeigt "Ab-Preis" — at Version 1

Reported by: Torsten Riemer Owned by: somebody
Priority: hoch Milestone: modified-shop-2.0.6.0
Component: Shop Version: 2.0.5.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Torsten Riemer)

Von 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.

EDIT: Problem ist klar, siehe Funktion checkAttributes() in "/includes/classes/xtcPrice.php":

2.0.5.0:

  function checkAttributes($pID) {
    if (!$this->showFrom_Attributes || $pID == 0) return;
    
    $pID = $this->priceModules->checkAttributes($pID);
    
    $products_attributes_query = "SELECT count(*) as total 
                                    FROM " . TABLE_PRODUCTS_ATTRIBUTES . " patrib
                                    JOIN " . TABLE_PRODUCTS_OPTIONS . " popt
                                         ON patrib.options_id = popt.products_options_id
                                            AND popt.language_id = '" . (int) $_SESSION['languages_id'] . "'
                                   WHERE patrib.options_values_price > 0
                                     AND patrib.products_id = '" . (int)$pID . "'";
    $products_attributes = xtDBquery($products_attributes_query);
    if (xtc_db_num_rows($products_attributes, true) > 0) {
      $products_attributes = xtc_db_fetch_array($products_attributes, true);
      if ($products_attributes['total'] > 0) {
        return ' ' . FROM . ' ';
      }
    }
  }

2.0.5.1:

  function checkAttributes($pID) {
    global $product;
    
    if (!$this->showFrom_Attributes || $pID == 0) return;
    
    $pID = $this->priceModules->checkAttributes($pID);
    $total = $product->getAttributesCount($pID);
    
    if ($total > 0) {
      return ' ' . FROM . ' ';
    }
  }

Die 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.

Change History (3)

by Torsten Riemer, 6 years ago

Attachment: Shopversion-2.0.5.0.png added

by Torsten Riemer, 6 years ago

Attachment: Shopversion-2.0.5.1.png added

comment:1 by Torsten Riemer, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.