Opened 4 weeks ago

Closed 4 weeks ago

#1821 closed Bug/Fehler (fixed)

Artikel mit Optionen ohne Aufpreis zeigt "Ab-Preis"

Reported by: Tomcraft Owned by: somebody
Priority: hoch Milestone: modified-shop-2.0.5.2
Component: Shop Version: 2.0.5.1

Description (last modified by Tomcraft)

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 Tomcraft 4 weeks ago.
Shopversion-2.0.5.1.png (1.0 MB) - added by Tomcraft 4 weeks ago.

Change History (5)

Changed 4 weeks ago by Tomcraft

Changed 4 weeks ago by Tomcraft

comment:1 Changed 4 weeks ago by Tomcraft

  • Description modified (diff)

comment:2 Changed 4 weeks ago by Tomcraft

  • Description modified (diff)

comment:3 Changed 4 weeks ago by GTB

  • Resolution set to fixed
  • Status changed from new to closed

In 12745:

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

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.