0 - |
select distinct pd.products_name, p.products_image, p.products_model, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.product_sort_order, m.manufacturers_name, if(s.status, s.specials_new_products_price, null) as specials_new_products_price, if(s.status, s.specials_new_products_price, p.products_price) as final_price
from (products p
left join specials_retail_prices s using(products_id) )
left join manufacturers m on p.manufacturers_id = m.manufacturers_id
left join themes t on p.themes_id = t.themes_id,
where p.products_status = '1'
and p.products_current_status = 'active'
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and p.products_id = pa.products_id and (pa.products_instock='on' || pa.override_outstock='on')
and pd.language_id = '1'
and p2c.categories_id = '2' and (products_group_access like "%,g,%" or products_group_access like "g,%" or products_group_access like "%,g" or products_group_access="g") order by m.manufacturers_name , t.themes_name limit 0, 90