Jump to content
xt:Commerce Community Forum

Fehler in class.auto_cross_sell.php


xplosion

Recommended Posts

Tag,

Habe einen "Flüchtigkeitsfehler" in oben genannter Cross Selling Klasse entdeckt. Ich hatte bei der Installation den DB-Prefix von "xt" auf "xt4" geändert und mich danach über einen SQL-Fehler beim Aufrufen von Produkten gewundert. Nach ein bisschen Suchen konnte ich den Fehler in Zeile 51 und 92 ausmachen:

$query = "SELECT bop.products_id FROM xt_orders_products aop, xt_orders_products bop WHERE aop.products_id='".$products_id."' and aop.products_id!=bop.products_id and aop.orders_id = bop.orders_id group by bop.products_id";

muss lauten:

$query = "SELECT bop.products_id FROM ".TABLE_ORDERS_PRODUCTS." aop, ".TABLE_ORDERS_PRODUCTS." bop WHERE aop.products_id='".$products_id."' and aop.products_id!=bop.products_id and aop.orders_id = bop.orders_id group by bop.products_id";

entsprechend bei Zeile 92 statt

$query = "SELECT bop.products_id FROM xt_orders_products aop, xt_orders_products bop WHERE aop.products_id IN (".implode(',',$ids).") and aop.products_id!=bop.products_id and aop.orders_id = bop.orders_id group by bop.products_id";

$query = "SELECT bop.products_id FROM ".TABLE_ORDERS_PRODUCTS." aop, ".TABLE_ORDERS_PRODUCTS." bop WHERE aop.products_id IN (".implode(',',$ids).") and aop.products_id!=bop.products_id and aop.orders_id = bop.orders_id group by bop.products_id";

Grüße

xplosion

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...