product listing - filter product by price

  • Posts: 2
  • Thank you received: 0
9 years 3 months ago #184467

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.4.19
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Error: 0 - SQL=SELECT DISTINCT b.product_id,pprice.price_value FROM l894u_hikashop_product_category AS a LEFT JOIN (SELECT * FROM l894u_hikashop_product AS product1 LEFT JOIN l894u_hikashop_price AS price1 ON product1.product_id=price1.price_product_id LEFT JOIN l894u_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERE (price1.price_access = 'all' OR price1.price_access LIKE '%,9,%' OR ISNULL(price1.price_access)) AND product1.product_type='main' GROUP BY product1.product_id ORDER BY price1.price_min_quantity ASC) AS b ON a.product_id=b.product_id LEFT JOIN l894u_hikamarket_vendor AS hikam_vendor ON b.product_vendor_id = hikam_vendor.vendor_id LEFT JOIN l894u_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (128,125,126,127,124,123,119,120,121,122,118,117,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,169,2) AND (b.product_access = 'all' OR b.product_access LIKE '%,9,%') AND ( ( case when b.price_currency_id IS NULL then 0 when b.price_currency_id = '1' and b.product_tax_id = '11' then (b.price_value/1)+(b.price_value/1)*0 when b.price_currency_id = '1' and b.product_tax_id NOT IN ('11') then (b.price_value/1) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '2' and b.product_tax_id = '11' then b.price_value+b.price_value*0 when b.price_currency_id = '2' and b.product_tax_id NOT IN ('11') then b.price_value when b.price_currency_id IS NULL then 0 when b.price_currency_id = '4' and b.product_tax_id = '11' then (b.price_value/0.8377)+(b.price_value/0.8377)*0 when b.price_currency_id = '4' and b.product_tax_id NOT IN ('11') then (b.price_value/0.8377) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '5' and b.product_tax_id = '11' then (b.price_value/1.4085)+(b.price_value/1.4085)*0 when b.price_currency_id = '5' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4085) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '6' and b.product_tax_id = '11' then (b.price_value/1.4422)+(b.price_value/1.4422)*0 when b.price_currency_id = '6' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4422) end ) >= 1 ) AND ( case when b.price_currency_id IS NULL then 0 when b.price_currency_id = '1' and b.product_tax_id = '11' then (b.price_value/1)+(b.price_value/1)*0 when b.price_currency_id = '1' and b.product_tax_id NOT IN ('11') then (b.price_value/1) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '2' and b.product_tax_id = '11' then b.price_value+b.price_value*0 when b.price_currency_id = '2' and b.product_tax_id NOT IN ('11') then b.price_value when b.price_currency_id IS NULL then 0 when b.price_currency_id = '4' and b.product_tax_id = '11' then (b.price_value/0.8377)+(b.price_value/0.8377)*0 when b.price_currency_id = '4' and b.product_tax_id NOT IN ('11') then (b.price_value/0.8377) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '5' and b.product_tax_id = '11' then (b.price_value/1.4085)+(b.price_value/1.4085)*0 when b.price_currency_id = '5' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4085) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '6' and b.product_tax_id = '11' then (b.price_value/1.4422)+(b.price_value/1.4422)*0 when b.price_currency_id = '6' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4422) end ) BETWEEN 13934 AND 101000 AND (hikam_vendor.vendor_published IS NULL OR hikam_vendor.vendor_published = 1) ORDER BY a.ordering ASC

Product filtering by price is not working and it return an error with for this query


Error: 0 - SQL=SELECT DISTINCT b.product_id,pprice.price_value FROM l894u_hikashop_product_category AS a LEFT JOIN (SELECT * FROM l894u_hikashop_product AS product1 LEFT JOIN l894u_hikashop_price AS price1 ON product1.product_id=price1.price_product_id LEFT JOIN l894u_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERE (price1.price_access = 'all' OR price1.price_access LIKE '%,9,%' OR ISNULL(price1.price_access)) AND product1.product_type='main' GROUP BY product1.product_id ORDER BY price1.price_min_quantity ASC) AS b ON a.product_id=b.product_id LEFT JOIN l894u_hikamarket_vendor AS hikam_vendor ON b.product_vendor_id = hikam_vendor.vendor_id LEFT JOIN l894u_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (128,125,126,127,124,123,119,120,121,122,118,117,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,169,2) AND (b.product_access = 'all' OR b.product_access LIKE '%,9,%') AND ( ( case when b.price_currency_id IS NULL then 0 when b.price_currency_id = '1' and b.product_tax_id = '11' then (b.price_value/1)+(b.price_value/1)*0 when b.price_currency_id = '1' and b.product_tax_id NOT IN ('11') then (b.price_value/1) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '2' and b.product_tax_id = '11' then b.price_value+b.price_value*0 when b.price_currency_id = '2' and b.product_tax_id NOT IN ('11') then b.price_value when b.price_currency_id IS NULL then 0 when b.price_currency_id = '4' and b.product_tax_id = '11' then (b.price_value/0.8377)+(b.price_value/0.8377)*0 when b.price_currency_id = '4' and b.product_tax_id NOT IN ('11') then (b.price_value/0.8377) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '5' and b.product_tax_id = '11' then (b.price_value/1.4085)+(b.price_value/1.4085)*0 when b.price_currency_id = '5' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4085) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '6' and b.product_tax_id = '11' then (b.price_value/1.4422)+(b.price_value/1.4422)*0 when b.price_currency_id = '6' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4422) end ) >= 1 ) AND ( case when b.price_currency_id IS NULL then 0 when b.price_currency_id = '1' and b.product_tax_id = '11' then (b.price_value/1)+(b.price_value/1)*0 when b.price_currency_id = '1' and b.product_tax_id NOT IN ('11') then (b.price_value/1) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '2' and b.product_tax_id = '11' then b.price_value+b.price_value*0 when b.price_currency_id = '2' and b.product_tax_id NOT IN ('11') then b.price_value when b.price_currency_id IS NULL then 0 when b.price_currency_id = '4' and b.product_tax_id = '11' then (b.price_value/0.8377)+(b.price_value/0.8377)*0 when b.price_currency_id = '4' and b.product_tax_id NOT IN ('11') then (b.price_value/0.8377) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '5' and b.product_tax_id = '11' then (b.price_value/1.4085)+(b.price_value/1.4085)*0 when b.price_currency_id = '5' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4085) when b.price_currency_id IS NULL then 0 when b.price_currency_id = '6' and b.product_tax_id = '11' then (b.price_value/1.4422)+(b.price_value/1.4422)*0 when b.price_currency_id = '6' and b.product_tax_id NOT IN ('11') then (b.price_value/1.4422) end ) BETWEEN 13934 AND 101000 AND (hikam_vendor.vendor_published IS NULL OR hikam_vendor.vendor_published = 1) ORDER BY a.ordering ASC

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 3 months ago #184476

Hi,

First, please update to the latest version and try again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.043 seconds
Powered by Kunena Forum