filter by Specification attributes not working

4 months ago
Hello Members,

We are working on Nopcommerce 4.30 version using the default theme and trying to filter by Specification attributes which not working. When we select any attributes to filter results show nothing.  Any idea?

https://i.imgur.com/Duqqhrp.jpg
https://i.imgur.com/HH9EqT9.jpg

Thanks
4 months ago
Hi,

I assume you have also added/mapped the Specification attribute on the product?  Have you cleared the nop cache and browser cache?

Jon

splgoa wrote:
Hello Members,

We are working on Nopcommerce 4.30 version using the default theme and trying to filter by Specification attributes which not working. When we select any attributes to filter results show nothing.  Any idea?

https://i.imgur.com/Duqqhrp.jpg
https://i.imgur.com/HH9EqT9.jpg

Thanks
3 months ago
Hi Jon,

Thanks for your quick response.

Yes, we have already added/mapped the Specification attribute on the products page. Also, we have cleared the nop cache and browser cache still the same issue persists.
3 months ago
splgoa wrote:
Hello Members,

We are working on Nopcommerce 4.30 version using the default theme and trying to filter by Specification attributes which not working. When we select any attributes to filter results show nothing.  Any idea?

https://i.imgur.com/Duqqhrp.jpg
https://i.imgur.com/HH9EqT9.jpg

Thanks

what is your database? MySql or SqlServer?
3 months ago
I face same issue for the mysql and also add a new issue at github https://github.com/nopSolutions/nopCommerce/issues/4973
I used the bellow query for mysql and seems working. The intension is very straigth forward select
product ids from Product_SpecificationAttribute_Mapping tabel.


IF `FilteredSpecs` REGEXP '^([[:digit:]](,?))+$' then  
          SET  @sql_command = concat(@sql_command, '    AND (p.Id in (     select distinct psa.ProductId from `Product_SpecificationAttribute_Mapping` as psa
inner join `SpecificationAttributeOption` sao
on sao.Id=psa.SpecificationAttributeOptionId
where psa.SpecificationAttributeOptionId in (', `FilteredSpecs` ,'))    )');