SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) AS quantity, IFNULL(product_attribute_shop.id_product_attribute, 0) AS id_product_attribute,\n
                    product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, pl.`description`, pl.`description_short`, pl.`available_now`,\n
                    pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image,\n
                    il.`legend` as legend, m.`name` AS manufacturer_name, cl.`name` AS category_default,\n
                    DATEDIFF(product_shop.`date_add`, DATE_SUB("2022-07-06 00:00:00",\n
                    INTERVAL 0 DAY)) > 0 AS new, product_shop.price AS orderprice\n
                FROM `sfa_category_product` cp\n
                LEFT JOIN `sfa_product` p\n
                    ON p.`id_product` = cp.`id_product`\n
                 INNER JOIN sfa_product_shop product_shop\n
        ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `sfa_product_attribute_shop` product_attribute_shop\n
                ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1)\n
                 LEFT JOIN sfa_stock_available stock\n
            ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop_group = 1  AND stock.id_shop = 0  )\n
                LEFT JOIN `sfa_category` c ON (c.`id_category` = cp.`id_category`\n
                   AND c.id_category=33 AND c.nleft >= 21 AND c.nright <= 94)\n
                LEFT JOIN `sfa_category_lang` cl\n
                    ON (product_shop.`id_category_default` = cl.`id_category`\n
                    AND cl.`id_lang` = 1 AND cl.id_shop = 1 )\n
                LEFT JOIN `sfa_product_lang` pl\n
                    ON (p.`id_product` = pl.`id_product`\n
                    AND pl.`id_lang` = 1 AND pl.id_shop = 1 )\n
                LEFT JOIN `sfa_image_shop` image_shop\n
                    ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1)\n
                LEFT JOIN `sfa_image_lang` il\n
                    ON (image_shop.`id_image` = il.`id_image`\n
                    AND il.`id_lang` = 1)\n
                LEFT JOIN `sfa_manufacturer` m\n
                    ON m.`id_manufacturer` = p.`id_manufacturer`\n
                WHERE c.id_category > 0\n
                    AND product_shop.`id_shop` = 1 AND product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog") GROUP BY cp.id_product
Retrouvez les pièces détachées pour les solutions SFA