1. SELECT SQL_CALC_FOUND_ROWS products.product_id, descr1.product as product, companies.company as company_name, products.product_type, products.parent_product_id, products.master_product_id, products.company_id, products.rf_stop_update_price, products.rf_stop_update_amount, products.rf_stop_update_status, (SELECT SUM(amount) FROM ?:products WHERE product_id = products.product_id AND company_id = 1) as geolocation_amount, 0 as geolocation_amount2 FROM ?:products as products  INNER JOIN ?:product_features_values as c_var ON c_var.product_id = products.product_id AND c_var.lang_code = 'ru' AND c_var.variant_id = 148798 LEFT JOIN ?:product_options_inventory as inventory ON inventory.product_id = products.product_id  LEFT JOIN ?:product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'ru'  LEFT JOIN ?:product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 LEFT JOIN ?:companies AS companies ON companies.company_id = products.company_id  INNER JOIN ?:products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN ?:categories ON ?:categories.category_id = products_categories.category_id  AND (?:categories.usergroup_ids = '' OR FIND_IN_SET(0, ?:categories.usergroup_ids) OR FIND_IN_SET(1, ?:categories.usergroup_ids)) AND ?:categories.status IN ('A', 'H')   WHERE 1  AND (companies.status = 'A' OR products.company_id = 0) AND (CASE products.tracking   WHEN 'O' THEN inventory.amount > 0   WHEN 'B' THEN products.amount > 0   ELSE 1 END) AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND prices.usergroup_id IN (0, 0, 1) AND products.approved = 'Y' AND products.parent_product_id = 0 AND products.master_product_status IN ('A') AND products.master_product_id = 0 AND products.product_type != 'D' GROUP BY products.product_id   ORDER BY IF(geolocation_amount>0, 1, 0) DESC, IF(geolocation_amount2>0, 1, 0) DESC, products.timestamp desc, products.product_id ASC  LIMIT 0, 20
    
Бренды :: RGK
К сожалению, нам не удалось найти магазин с таким идентификационным кодом
Введите код магазина:

В этой категории нет товаров