by
646 12
0
4
157k
2
Top 1% !
Pearl of Wisdom
Tagged
Refined
Popularity: 11918th place

Published on:

BrowserAll
LanguageSQL
OSAll
SourceGitHub
SourceMyGists

Returns Descriptions for all active Magento products

Returns Descriptions for all active Magento products: 
Magento-active-product-descriptions.sql
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1618961/Returns-Descriptions-for-all-active-Mage?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
SELECT e.entity_id, e.sku, eav.value AS 'description', IF(at_status.value_id > 0, at_status.value, at_status_default.value) AS `status` FROM catalog_product_entity e JOIN catalog_product_entity_text eav ON e.entity_id = eav.entity_id JOIN eav_attribute ea ON eav.attribute_id = ea.attribute_id INNER JOIN `catalog_product_entity_int` AS `at_status_default` ON (`at_status_default`.`entity_id` = `e`.`entity_id`) AND (`at_status_default`.`attribute_id` = '89') AND `at_status_default`.`store_id` = 0 LEFT JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`) AND (`at_status`.`attribute_id` = '89') AND (`at_status`.`store_id` = 1) WHERE ea.attribute_code = 'description' AND IF(at_status.value_id > 0, at_status.value, at_status_default.value) = 1 LIMIT 9999
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus