FROM #__hikashop_product_category AS a LEFT JOIN #__hikashop_product AS b ON a.product_id=b.product_id LEFT JOIN #__hikashop_category AS man ON b.product_manufacturer_id = man.category_id WHERE (b.product_published = 1) AND (b.product_type = 'main') AND (a.category_id IN (13,14,21,51,77,78,79,2)) AND ((b.product_access = 'all' OR b.product_access LIKE '%,9,%')) AND ((( b.rpp_product_sheet_type = 'single-face'OR b.rpp_product_sheet_type LIKE 'single-face,%'OR b.rpp_product_sheet_type LIKE '%,single-face'OR b.rpp_product_sheet_type LIKE '%,single-face,%' ))) ORDER BY man.category_ordering, a.ordering ASC