Tulostimien erikoistarvikkeet

Tuotteet 1 - 1  (Yhteensä 1)
Brother autoasennussarja PA-CM-500 - Tulostimien erikoistarvikkeet - 2NDC-65107 - 1
Brother
118,00 €
Heti varastosta (Tavarantoimittajan varasto)
Toimitusaika 2-5 arkipäivää
SELECT IF (c2.parent_id > 0, c2.sort_order, c.sort_order) as parent, c.categories_id, c.sort_order, if((SELECT products_id FROM products WHERE products_id = p.multiproduct_id AND products_status = 1) != '', p.multiproduct_id,p.products_id) as products_id, IF(CHAR_LENGTH(TRIM(p.multiproduct_id)) > 0 AND p.multiproduct_id IS NOT NULL, p.multiproduct_id, p.products_id) as multi_id, IF (pd2.products_name != '' AND pd2.products_name IS NOT NULL, pd2.products_name, pd.products_name) as product_name, p2c.categories_id, tr.tax_rate, min(IF(s.status, IF((s.specials_new_products_price > 0), s.specials_new_products_price, (p.products_price * (1 - (s.products_discount / 100)) ) ), p.products_price) * (1 + tr.tax_rate / 100)) as final_price , (poh.final_price * SUM(poh.qty)) as sum FROM products_to_categories p2c INNER JOIN products p ON p.products_id = p2c.products_id AND p.products_status = '1' AND p.bottle_deposit = '0' LEFT JOIN tax_rates tr ON tr.tax_class_id = p.products_tax_class_id AND tr.tax_zone_id = '1' INNER JOIN products_description pd ON pd.products_id = p2c.products_id AND pd.language_id = '1' LEFT JOIN products_description pd2 ON pd2.products_id = p.multiproduct_id AND pd2.language_id = '1' LEFT JOIN categories c ON c.categories_id = p2c.categories_id LEFT JOIN categories c2 ON c2.categories_id = c.parent_id LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id LEFT JOIN specials s ON s.products_id = p.products_id LEFT JOIN products_order_history poh ON poh.products_id = p.products_id AND DATE_SUB(CURDATE(), INTERVAL 90 DAY) <= poh.date AND poh.date <= '2017-06-26 00:00:00' WHERE p2c.categories_id IN ('623101') AND ((p.trg_free_quantity > 0 OR p.trg_visible_storages > 0) OR p.view_only IN ('1', '2') ) AND (p.course_reservation_needed = '0' OR (p.course_reservation_needed = '1' AND (p.course_reservation_due_date = 0 OR DATE_ADD(p.course_reservation_due_date, INTERVAL 1 DAY) > '2017-06-26 00:00:00' ) ) ) AND (( EXISTS ( SELECT cmv.manufacturers_id FROM customers_manufacturers_visibility cmv WHERE cmv.customers_id = '0' AND cmv.manufacturers_id = p.manufacturers_id )) OR ( NOT EXISTS( SELECT cmvv.manufacturers_id FROM customers_manufacturers_visibility cmvv WHERE cmvv.customers_id = '0' )) OR p.manufacturers_id = '') AND (( EXISTS ( SELECT gpv.products_id FROM customers_groups_products_visibility gpv WHERE gpv.group_id = '0' AND gpv.products_id = p.products_id )) OR ( NOT EXISTS( SELECT g.products_id FROM customers_groups_products_visibility g WHERE p.products_id = g.products_id))) GROUP BY multi_id ORDER BY parent, c.sort_order, sum desc, p2c.sort_order, p2c.products_id