Average discount in magento 1.4.1
Copy this code and paste it in your HTML
FROM catalog_product_index_price
AS t1
JOIN catalog_product_entity
AS t2
ON t1.entity_id
= t2.entity_id
WHERE (t1.customer_group_id
= 0 AND t1.website_id
= 1) AND (t1.final_price
> 0 AND t1.price
> 0) AND t2.type_id
= 'simple'
FROM catalog_product_index_price
AS t1
JOIN catalog_product_entity
AS t2
ON t1.entity_id
= t2.entity_id
WHERE (t1.customer_group_id
= 0 AND t1.website_id
= 1) AND (t1.final_price
> 0 AND t1.price
> 0) AND t2.type_id
= 'simple'
// AVERAGE PRICE
ON BUNDLED PRODUCTS
FROM catalog_product_index_price
AS t1
JOIN catalog_product_entity
AS t2
ON t1.entity_id
= t2.entity_id
WHERE (t1.customer_group_id
= 0 AND t1.website_id
= 1) AND (t1.final_price
> 0 AND t1.price
> 0) AND t2.type_id
= 'bundle'
URL: avg-magento-discount
Report this snippet
Comments
Subscribe to comments