Hi nicolas,
We have try to perform the same but for some reason we get an error and the query printed below is:
500
JDatabaseMySQL::query: 1066 - Not unique table/alias: 'b' SQL=SELECT DISTINCT b.* FROM jos_hikashop_product_category AS a LEFT JOIN jos_hikashop_product AS b ON a.product_id=b.product_id LEFT JOIN jos_hikashop_price AS b ON b.price_product_id=a.product_id AND b.price_min_quantity=1 INNER JOIN jos_hikashop_file AS c ON b.product_id=c.file_ref_id AND c.file_type='product' WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,50,40,41,42,43,44,45,46,47,48,49,51,52,53,2) AND b.product_quantity!=0 AND (b.product_access = 'all' OR b.product_access LIKE '%,29,%') AND ( ( case when b.price_currency_id = '1' then b.price_value when b.price_currency_id = '2' then b.price_value/1 end ) <= 75 ) AND b.product_weight > 0 AND c.file_id>0 ORDER BY a.ordering ASC LIMIT 0, 20
i guess because before we did not have debug mode on we did not catch this and we were only seeing empty page.
I have changed the query to
$on.=' LEFT JOIN '.hikashop_table('price').' AS d ON d.price_product_id=a.product_id AND d.price_min_quantity=1';
but we get the below
JDatabaseMySQL::query: 1054 - Unknown column 'b.price_currency_id' in 'where clause' SQL=SELECT DISTINCT b.* FROM jos_hikashop_product_category AS a LEFT JOIN jos_hikashop_product AS b ON a.product_id=b.product_id LEFT JOIN jos_hikashop_price AS d ON d.price_product_id=a.product_id AND d.price_min_quantity=1 INNER JOIN jos_hikashop_file AS c ON b.product_id=c.file_ref_id AND c.file_type='product' WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,50,40,41,42,43,44,45,46,47,48,49,51,52,53,2) AND b.product_quantity!=0 AND (b.product_access = 'all' OR b.product_access LIKE '%,29,%') AND ( ( case when b.price_currency_id = '1' then b.price_value when b.price_currency_id = '2' then b.price_value/1 end ) <= 75 ) AND b.product_weight > 0 AND c.file_id>0 ORDER BY a.ordering ASC LIMIT 0, 20
Can you advice?
Thanks