Re: Add Extra options to Sort By in products list V4.x.x
continued ... I added this line "produpdated" => func_get_langvar_by_name("lbl_prod_update_date"), and on line 603 I added this --- case "produpdated":
$sort_string = "$sql_tbl[products_extra_field_value].prod_update_date $direction";
break;
but I get this error message when I use the sort --- INVALID SQL: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC, xcart_products.product ASC, xcart_products.productcode ASC, xcart_products.' at line 1
SQL QUERY FAILURE:SELECT COUNT(xcart_products.productid) FROM xcart_pricing, xcart_products LEFT JOIN xcart_quick_flags ON xcart_quick_flags.productid = xcart_products.productid LEFT JOIN xcart_product_memberships ON xcart_product_memberships.productid = xcart_products.productid INNER JOIN xcart_quick_prices ON xcart_quick_prices.productid = xcart_products.productid AND xcart_quick_prices.membershipid = '0' LEFT JOIN xcart_variants ON xcart_variants.productid = xcart_products.productid AND xcart_quick_prices.variantid = xcart_variants.variantid INNER JOIN xcart_products_categories ON xcart_products_categories.productid = xcart_products.productid INNER JOIN xcart_categories ON xcart_products_categories.categoryid = xcart_categories.categoryid LEFT JOIN xcart_category_memberships ON xcart_category_memberships.categoryid = xcart_categories.categoryid WHERE xcart_quick_prices.priceid = xcart_pricing.priceid AND xcart_products.product_type <> 'C' AND xcart_products.forsale <> 'B' AND xcart_category_memberships.membershipid IS NULL AND xcart_product_memberships.membershipid IS NULL AND xcart_categories.avail = 'Y' AND xcart_products_categories.categoryid='253' AND (xcart_products_categories.main='Y' OR xcart_products_categories.main!='Y') AND (xcart_products.forsale = 'Y' OR xcart_products.forsale = '') GROUP BY xcart_products.productid ORDER BY .prod_update_date ASC, xcart_products.product ASC, xcart_products.productcode ASC, xcart_products.productid ASC
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/unique/public_html/cart/include/func/func.db.php on line 157
__________________
Version 4.1.11
License products:
X-Cart Gold
Add-on: X-FeatureComparison
Add-on: X-SpecialOffers
Add-on: X-AOM (Advanced Order Management)
Add-on: X-FancyCategories
|