Hi,
I’ve been struggling for 2 day with writing a MySql query which would select all the products without product descriptions.
The main problem I have is that I cannot understand from where does the store gets this product.
I’m on v3.0.6 Ultimate with 2 front stores. Sometimes the description is from cscart_product_descriptions and sometimes from cscart_ult_product_descriptions.
I will be more than glad to donate few bucks for a bottle of whiskey to the daredevil who will solve this mystery
Hint:
That’s as far as I could get
<br />
SELECT DISTINCT cscart_products.product_id,cscart_products.product_code, cscart_product_descriptions.product, cscart_product_descriptions.full_description<br />
FROM cscart_products INNER JOIN cscart_product_descriptions<br />
ON cscart_products.product_id = cscart_product_descriptions.product_id<br />
WHERE (IFNULL(cscart_product_descriptions.full_description, '') = '' AND cscart_products.product_id IN (SELECT product_id FROM cscart_ult_product_descriptions WHERE cscart_ult_product_descriptions.full_description IS NULL OR cscart_ult_product_descriptions.full_description = '' AND cscart_ult_product_descriptions.lang_code = 'PL'))<br />
OR (IFNULL(cscart_product_descriptions.full_description, '') = '' AND cscart_products.product_id NOT IN (SELECT product_id FROM cscart_ult_product_descriptions WHERE cscart_ult_product_descriptions.full_description IS NOT NULL OR cscart_ult_product_descriptions.full_description <> '' AND cscart_ult_product_descriptions.lang_code = 'PL'))<br />
OR (IFNULL(cscart_product_descriptions.full_description, '') = '' OR cscart_products.product_id NOT IN (SELECT product_id FROM cscart_ult_product_descriptions WHERE cscart_ult_product_descriptions.lang_code = 'PL'))<br />
AND IFNULL(cscart_product_descriptions.full_description, '') = ''<br />
AND cscart_products.status = 'A'<br />
AND cscart_product_descriptions.lang_code = 'PL'<br />