PDA

View Full Version : Group Simular Products



michael_s
02-02-2011, 10:01 AM
Prevent an SQL error appearing on the front page when you have product names with characters such as " or ' etc:

Example:

3' 5" memory foam mattress etc

In the new function created by this mod find each instance that reads $linked_products_query = etc etc...

And replace with:

$linked_products_query = tep_db_query("SELECT pd.products_name, pd.products_id, p.products_id, p.products_price, p.products_tax_class_id
FROM products_description pd, products p
WHERE left(products_name,'" . addslashes($len_cname) . "') = '" . addslashes($cname_new) . "' AND p.products_id = pd.products_id");



Note: Also noticed a bug where the first item in the dropdown cannot be clicked, it dosent take you through to the relative product_info.php page!

More... (http://addons.oscommerce.com/info/7808)