- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
SELECT product.entity_id as pid,
vTitle.value as title, vLength.value as length, vWidth.value as width, vHeight.value as height, vWeight.value as weight, vCapacity.value as capacity, vImg.value as img,
tShort.value as short, tText.value as text,
dPrice.value as price,
cParent.category_id as parent
FROM catalog_product_entity as product
LEFT JOIN catalog_product_entity_varchar as vTitle ON vTitle.entity_id=product.entity_id AND vTitle.attribute_id=60
LEFT JOIN catalog_product_entity_varchar as vLength ON vLength.entity_id=product.entity_id AND vLength.attribute_id=122
LEFT JOIN catalog_product_entity_varchar as vWidth ON vWidth.entity_id=product.entity_id AND vWidth.attribute_id=123
LEFT JOIN catalog_product_entity_varchar as vHeight ON vHeight.entity_id=product.entity_id AND vHeight.attribute_id=124
LEFT JOIN catalog_product_entity_varchar as vWeight ON vWeight.entity_id=product.entity_id AND vWeight.attribute_id=69
LEFT JOIN catalog_product_entity_varchar as vCapacity ON vCapacity.entity_id=product.entity_id AND vCapacity.attribute_id=125
LEFT JOIN catalog_product_entity_varchar as vImg ON vImg.entity_id=product.entity_id AND vImg.attribute_id=74
LEFT JOIN catalog_product_entity_text as tShort ON tShort.entity_id=product.entity_id AND tShort.attribute_id=62
LEFT JOIN catalog_product_entity_text as tText ON tText.entity_id=product.entity_id AND tText.attribute_id=61
LEFT JOIN catalog_product_entity_decimal as dPrice ON dPrice.entity_id=product.entity_id AND dPrice.attribute_id=64
LEFT JOIN (SELECT c.category_id, c.product_id FROM catalog_category_product as c ORDER BY c.category_id DESC) as cParent ON cParent.product_id=product.entity_id
GROUP BY cParent.product_id ORDER BY cParent.product_id
Мой говнокод-неговнокод по экспорту товара из Magento в нашу CMS
alexoy 17.10.2011 18:52 # −6
Lure Of Chaos 17.10.2011 19:48 # +4
Uhehesh 17.10.2011 20:51 # 0
SmackMyBitchUp 17.10.2011 20:54 # +3
guest8 09.04.2019 11:45 # −999