1. SELECT SQL_CALC_FOUND_ROWS (CASE WHEN products.parent_product_id <> 0 THEN products.parent_product_id ELSE products.product_id END) AS product_id, descr1.product as product, companies.company as company_name, GROUP_CONCAT(products.product_id ORDER BY products.parent_product_id ASC, products.product_id ASC) AS product_ids, GROUP_CONCAT(products.product_type ORDER BY products.parent_product_id ASC, products.product_id ASC) AS product_types, GROUP_CONCAT(products.parent_product_id ORDER BY products.parent_product_id ASC, products.product_id ASC) AS parent_product_ids, products.product_type, products.parent_product_id, products.master_product_offers_count, products.master_product_id, products.company_id, IF(products.cp_buying_types != 'V',products.cp_buying_types,IF(products.company_id != 0,companies.cp_buying_types,'C')) as cp_buying_types 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 = 'en' AND c_var.variant_id = 1365 LEFT JOIN ?:product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'en'  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 (cs_categories.usergroup_ids = '' OR FIND_IN_SET(0, cs_categories.usergroup_ids) OR FIND_IN_SET(1, cs_categories.usergroup_ids)) AND cs_categories.status IN ('A', 'H') AND cs_categories.storefront_id IN (0, 1)  LEFT JOIN ?:warehouses_sum_products_amount as war_sum_amount ON war_sum_amount.product_id = products.product_id LEFT JOIN ?:master_products_storefront_offers_count AS master_products_storefront_offers_count  ON master_products_storefront_offers_count.product_id = products.product_id AND master_products_storefront_offers_count.storefront_id = 1  WHERE 1  AND (companies.status IN ('A') OR products.company_id = 0) AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) AND products.master_product_status IN ('A') AND products.master_product_id = 0 AND (products.company_id > 0 OR (master_products_storefront_offers_count.count > 0 )) GROUP BY product_id   ORDER BY product asc, products.product_id ASC  LIMIT 0, 50
    
  2. Array
    (
        [area] => C
        [use_caching] => 1
        [extend] => Array
            (
                [0] => product_name
                [1] => prices
                [2] => categories
                [3] => description
                [4] => companies
            )
    
        [custom_extend] => Array
            (
            )
    
        [pname] => 
        [pshort] => 
        [pfull] => 
        [pkeywords] => 
        [feature] => Array
            (
            )
    
        [type] => simple
        [page] => 1
        [action] => 
        [filter_variants] => Array
            (
            )
    
        [features_hash] => 
        [limit] => 0
        [bid] => 0
        [match] => 
        [tracking] => Array
            (
            )
    
        [get_frontend_urls] => 
        [items_per_page] => 50
        [apply_disabled_filters] => 
        [load_products_extra_data] => 1
        [storefront] => 
        [company_ids] => 
        [show_master_products_only] => 
        [include_child_variations] => 1
        [sort_order] => asc
        [srsltid] => AfmBOooopY_YwEnVxduaUIZwIWMs0h7EWqFWjLhxxlh6yiGdJgksegBs
        [dispatch] => product_features.view
        [variant_id] => 1365
        [save_view_results] => product_id
        [get_detailed_warehouses_amounts] => 
        [runtime_company_id] => 0
        [hide_out_of_stock_products] => 
        [sort_by] => product
        [for_current_storefront] => 1
        [company_status] => A
        [usergroup_ids] => Array
            (
                [0] => 0
                [1] => 1
            )
    
        [group_child_variations] => 1
        [sort_order_rev] => desc
    )