Modify

Opened 6 years ago

Closed 6 years ago

#1821 closed Bug/Fehler (fixed)

Artikel mit Optionen ohne Aufpreis zeigt "Ab-Preis"

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 getAttributesCount() in der Produkt-Klasse unterscheidet sich zur Funktion checkAttributes() der xtcPrice-Klasse dahingehend, dass dort keine Abfrage nach WHERE patrib.options_values_price > 0 enthalten ist.

Attachments (2)

Shopversion-2.0.5.0.png (1.0 MB ) - added by Torsten Riemer 6 years ago.
Shopversion-2.0.5.1.png (1.0 MB ) - added by Torsten Riemer 6 years ago.

Change History (5)

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)

comment:2 by Torsten Riemer, 6 years ago

Description: modified (diff)

comment:3 by Gerhard Waldemair, 6 years ago

Resolution: fixed
Status: newclosed

In 12745:

fix #1821 - fix products with options without surcharge shows FROM price

Modify Ticket

Action
as closed The owner will remain somebody.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.