#1 (permalink)  
Alt 05.08.2006, 23:52
Neuer Benutzer
 
Registriert seit: 05.08.2006
Beiträge: 1
Standard Ein gelöstes Problem mit new_products.php

Hallo,

wir hatten folgendes Problem:

Wenn ein Artikel zum mehreren Kategorien zugeordnet wird z.B.: comedy and action, dann erscheint der Artikel mehrmals in new_products box. Wenn man der Artikel zum 5 Kategorien zuordnet, dann erscheint Artikel 5 mal.

Das Problem betrifft nicht:
1. die Startseite, da dort Top Produkten angezeigt werden.
2. products_new.php Seite. Alles erscheint 1 Mal.

Wir haben die SQL Abfrage von products_new.php (line 51) an der Stelle new_products.php (line 54) eingesetzt mit der Erkennung von Untergruppen und MAX limit.

$new_products_query = "select distinct
p.products_id,
p.products_fsk18,
pd.products_name,
p.products_image,
p.products_price,
p.products_tax_class_id,
p.products_date_added,
m.manufacturers_name
from " . TABLE_PRODUCTS . " p,
" . TABLE_CATEGORIES . " c,
" . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
left join " . TABLE_MANUFACTURERS . " m
on p.manufacturers_id = m.manufacturers_id
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd
on p.products_id = pd.products_id ".$fsk_lock."
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
where c.categories_status=1
and p.products_id = p2c.products_id
and c.categories_id = p2c.categories_id
and products_status = '1'
".$group_check."
".$fsk_lock."
".$days."
and c.parent_id = '".$new_products_category_id."'
order by p.products_date_added DESC limit ".MAX_DISPLAY_NEW_PRODUCTS;

Jetzt ist das Problem weg.

Have a nice day.
Kinoman
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
gelöstes, newproductsphp, problem

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 08:11 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand