![]() |
Upselling Products
I can seem to get the upselling products to arrange in any type of order.
I set the order then they do their own thing. Can someone please help with this feature? My client wants them in a particular order. Thanks John |
Yeah - the file to edit is modules/Upselling_products/related_products.php
Look for a line that is: $product_links = func_query($search_query = "select DISTINCT $sql_tbl[products].*, $sql_tbl[categories].category, $sql_tbl[pricing].price from $sql_tbl[products], $sql_tbl[pricing], $sql_tbl[categories], $sql_tbl[product_links] where ($sql_tbl[pricing].membership='') and ($sql_tbl[pricing].productid=$sql_tbl[products].productid) and ($sql_tbl[pricing].quantity=1) and ($sql_tbl[products].categoryid=$sql_tbl[categories].categoryid) and $sql_tbl[products].forsale='Y' and ($sql_tbl[products].productid=$sql_tbl[product_links].productid2) and ($sql_tbl[product_links].productid1='$productid') ORDER BY $sql_tbl[products].product"); The thing to change is the last part - if you want to change it, change to "table_name.field_name" eg: to order by the orderby setting in the cart admin: ORDER BY $sql_tbl[products].orderby |
Error
INVALID SQL: 1109 : Unknown table 'table_name' in order clause
SQL QUERY FAILURE: select DISTINCT xcart_products.*, xcart_categories.category, xcart_pricing.price from xcart_products, xcart_pricing, xcart_categories, xcart_product_links where (xcart_pricing.membership='') and (xcart_pricing.productid=xcart_products.productid) and (xcart_pricing.quantity=1) and (xcart_products.categoryid=xcart_categories.catego ryid) and xcart_products.forsale='Y' and (xcart_products.productid=xcart_product_links.prod uctid2) and (xcart_product_links.productid1='2') ORDER BY table_name.field_name Here is what happens when I do that |
Where I said:
The thing to change is the last part - if you want to change it, change to "table_name.field_name" eg: table_name.field should not be put in literally, but should be replaced by the xcart table and field name as demonstrated. ie. xcart_products.orderby. :D |
All times are GMT -8. The time now is 05:34 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.