Notice: Error: Unknown column 'p.product_id' in 'where clause'
Error No: 1054
SELECT ag.attribute_group_id, agd.name FROM oc_product_attribute pa LEFT JOIN oc_attribute a ON (pa.attribute_id = a.attribute_id) LEFT JOIN oc_attribute_group ag ON (a.attribute_group_id = ag.attribute_group_id) LEFT JOIN oc_attribute_group_description agd ON (ag.attribute_group_id = agd.attribute_group_id) WHERE pa.product_id = '3496' AND CASE WHEN (SELECT COUNT(*) as total FROM oc_category_customer_group ciccg1 WHERE ciccg1.category_id IN (SELECT category_id FROM oc_product_to_category cip2c1 WHERE cip2c1.product_id=p.product_id) ) > 0 THEN CASE WHEN (SELECT COUNT(*) as total FROM oc_category_customer_group ciccg1 WHERE ciccg1.category_id IN (SELECT category_id FROM oc_product_to_category cip2c1 WHERE cip2c1.product_id=p.product_id) AND ciccg1.customer_group_id IN(1) ) > 0 THEN true ELSE false END ELSE true END AND CASE WHEN (SELECT COUNT(*) as total FROM oc_product_customer_group pcg WHERE pcg.product_id=p.product_id) > 0 THEN CASE WHEN (SELECT COUNT(*) as total FROM oc_product_customer_group pcg WHERE pcg.product_id=p.product_id AND pcg.customer_group_id='1') > 0 THEN true ELSE false END ELSE true END AND agd.language_id = '3' GROUP BY ag.attribute_group_id ORDER BY ag.sort_order, agd.name in /home/onesi/domains/onesixthkit.com/public_html/system/database/mysql.php on line 50