Query To Select Products Without Description

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 />

Hello,

You want to select all the products. So its better to export the products sql to a cvs file and open with excell.

From there remove the colomn “description”



Should be much easier than your doing. I dont know also for what purpose you need this.



Regards

Thanks for answer Anaconda,

unfortunately that's not what I need.



I upload products and later someone else is doing copywriting for me. Using power query I can generate reports with a to do list.

The process will be repeated in future so writing single query is the preferable way to do this.

I believe (but not certain) that in V3, the ult_products_description table is used in the admin area only and it only contains those products that are shared. Maybe you could describe the problem you want to solve versus the solution you've chosen. If all you want to do is eliminate the description field, then use the 'get_products_post' PHP hook and simply unset the index for 'description'.

Thanks, tbirnseth

I unnecessarily joined cscart_ult_product_descriptions :-)



Problem solved!