SELECT DISTINCT p.products_id, p.products_price_tax, pd.products_name, cu.value, cu.currencies_marza, (p.products_price_tax/cu.value)+(cu.value*cu.currencies_marza/100) AS cena
FROM products p
LEFT JOIN currencies cu ON cu.currencies_id = p.products_currencies_id
LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id
LEFT JOIN products_description pd ON pd.products_id = p.products_id AND pd.language_id = '2'
WHERE ptc.categories_id in (1129,1152,1153,1154,1162,1168,1155,1163,1164,1165,1166,1158,1180,1182,1183,1184,1160,1157,1161,1167,1159,1156) AND
p.products_status = '1' and p.listing_status = '0' and ( (p.customers_group_id = '0' or p.customers_group_id = '' ) )
ORDER BY p.sort_order desc, pd.products_name LIMIT 0,24