whitebuffalo Posted May 14, 2007 Share Posted May 14, 2007 Testing my first site installation and both the quick find box and the advance search box returns the following: >Products meeting the search criteria >1066 - Not unique table/alias: 'pd' >select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join >specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_description pd, categories c, products_to_categories >p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and >p2c.categories_id = c.categories_id and ((pd.products_name like '%atv%' or p.products_model like '%atv%' or m.manufacturers_name like >'%atv%') ) >[TEP STOP] I am running Seperate Pricing Per Customer and Discount Coupon Codes. Anyone have any suggestions? Be gentle on the newbie :-) Link to comment Share on other sites More sharing options...
broomfish Posted May 16, 2007 Share Posted May 16, 2007 I have exactly the same problem, running exactly the same contributions. Did anyone reply to you privatley with an answer? Testing my first site installation and both the quick find box and the advance search box returns the following: >Products meeting the search criteria >1066 - Not unique table/alias: 'pd' >select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join >specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_description pd, categories c, products_to_categories >p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and >p2c.categories_id = c.categories_id and ((pd.products_name like '%atv%' or p.products_model like '%atv%' or m.manufacturers_name like >'%atv%') ) >[TEP STOP] I am running Seperate Pricing Per Customer and Discount Coupon Codes. Anyone have any suggestions? Be gentle on the newbie :-) Link to comment Share on other sites More sharing options...
whitebuffalo Posted May 18, 2007 Author Share Posted May 18, 2007 No, sorry. No solution yet. I have exactly the same problem, running exactly the same contributions.Did anyone reply to you privatley with an answer? Link to comment Share on other sites More sharing options...
krachico Posted June 5, 2007 Share Posted June 5, 2007 For those who are using the Separate Pricing Per Customer (SPC) logic in their oSC: Change these 2 lines in advanced_search_result.php: 1) Around line 265 from : if ($status_tmp_product_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } elseif ($status_tmp_special_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } else { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } to if ($status_tmp_product_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } elseif ($status_tmp_special_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS_RETAIL_PRICES . " s using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } else { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } 2) Comment out the line 283: // $from_str .= ", " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; Since this concatenation was already done in the previous IF logic (265-272) Khaled Rachico Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.