Close

Bugs

emiljohnsen
3 years ago
#10550 Quote
Avatar
  • 1
I recently installed AjaxFilters, and it displays the available filters well enough, but when I select a filter option, nothing happens. 

The console outputs the following error: 

Filters.min.js:6 Uncaught TypeError: Cannot read property 'wrapper' of null

I have a custom view for categories, but the plugin itself is straight out of the box. 

Boyko
3 years ago
#10552 Quote
Avatar
  • Moderator
  • 1437
emiljohnsen wrote:
I recently installed AjaxFilters, and it displays the available filters well enough, but when I select a filter option, nothing happens. 

The console outputs the following error: 

Filters.min.js:6 Uncaught TypeError: Cannot read property 'wrapper' of null

I have a custom view for categories, but the plugin itself is straight out of the box. 



Hi emiljohnsen,

Please refer to our documentation for the steps required to add a new category template to the Ajax Filters.
http://www.nop-templates.com/ajax-filters-plugin-for-nopcommerce-documentation#addcategorytemplate
Regards,
Boyko Stanev
Nop-Templates.com
IvanSlater
3 years ago
#10600 Quote
Avatar
  • 89
Boyko wrote:
I recently installed AjaxFilters, and it displays the available filters well enough, but when I select a filter option, nothing happens. 

The console outputs the following error: 

Filters.min.js:6 Uncaught TypeError: Cannot read property 'wrapper' of null

I have a custom view for categories, but the plugin itself is straight out of the box. 



Hi emiljohnsen,

Please refer to our documentation for the steps required to add a new category template to the Ajax Filters.
http://www.nop-templates.com/ajax-filters-plugin-for-nopcommerce-documentation#addcategorytemplate


In our case, our plugin overrides the default category method because we are using a customized catalog class, with new properties.

When enable your plugin, filters are displayed correctly, but same error above when selecting any filter option, we added the code below and error is fixed, but when any filter selected, we always got "No Products Found message", even when clearing filters. Can you help?


<div id="nopAjaxFiltersNoProductsDialog" title="@T("SevenSpikes.NopAjaxFilters.Client.Common.NoResultsFoundTitle")">
    <p>@T("SevenSpikes.NopAjaxFilters.Client.Common.NoResultsFoundMessage")</p>
</div>
iliyan.tanev
3 years ago
#10601 Quote
Avatar
  • Moderator
  • 347
Hi,

Can you check the Network tab in your browser console and inspect the Request Payload for the getFilteredProducts request?

Make sure it contains the appropriate ids of the selected filter options. For example, if you select some specification the specificationFiltersModel7Spikes.SpecificationFilterGroups should have some of the items with FilterItemState selected.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
IvanSlater
3 years ago
#10602 Quote
Avatar
  • 89
iliyan.tanev wrote:
Hi,

Can you check the Network tab in your browser console and inspect the Request Payload for the getFilteredProducts request?

Make sure it contains the appropriate ids of the selected filter options. For example, if you select some specification the specificationFiltersModel7Spikes.SpecificationFilterGroups should have some of the items with FilterItemState selected.



Hi!

This is the payload when select atribute color: black (Preto) in our language!

See post bellow:
IvanSlater
3 years ago
#10603 Quote
Avatar
  • 89
The full message is being cut..

{"categoryId":"17","manufacturerId":"0","vendorId":"0","priceRangeFilterModel7Spikes":{"CategoryId":"17","ManufacturerId":"0","VendorId":"0","SelectedPriceRange":{},"MinPrice":"4","MaxPrice":"300"},"specificationFiltersModel7Spikes":{"CategoryId":"17","ManufacturerId":"0","VendorId":"0","SpecificationFilterGroups":[{"Id":"4","FilterItems":[{"Id":"11","FilterItemState":"Unchecked"}]}]},"attributeFiltersModel7Spikes":{"CategoryId":"17","ManufacturerId":"0","VendorId":"0","AttributeFilterGroups":[{"Id":"1","FilterItems":[{"Name":"M","ProductVariantAttributeIds":["1483","1171","1266","1272","1467","1268","1222","1102","1416","1416","1352","1109","1109","1383","1182","1072","28","28","1113","2538","1250","54","1316","1316","48","1212","1202","1156","1350","2516","2536","2534","2530","2528","2524","2522","2412","2410","2408","2114","2047","1477","1487","1487","1464","1458","1363","1404","1404","1414","2343","2545","1077","1308","1111","39","52","1284","1230","1436","38","1220","2520","1396","1326","1326","46","1115","1115","1411","24","1185","1378","1343","2518","1231","1074","1403","2514","2092","1186","1193","1320","1320","1183","2526","42","7","17","17","15","26","30","30","5","34","34","32","18","18","23","23","13","13","9"],"FilterItemState":"Unchecked"},{"Name":"G","ProductVariantAttributeIds":["1483","1482","42","46","52","39","48","1228","54","1375","28","28","1376","1109","1109","9","13","13","23","23","1270","18","18","32","1268","1467","1272","34","34","1111","1266","1248","5","1171","30","30","26","15","17","17","7","2526","1183","1320","1320","1193","1186","2092","2514","1403","1074","1231","2518","1343","1378","1185","1411","24","1115","1115","1326","1326","1396","2520","1220","38","1436","1230","1284","1308","1077","2545","2343","1414","1404","1404","1363","1458","1464","1487","1487","1477","2047","2114","2408","2410","2412","2522","2524","2528","2530","2534","2536","2516","1350","1202","1212","1316","1316","2538","1113","1072","1182","1383","1352","1416","1416","1102","1222"],"FilterItemState":"Unchecked"},{"Name":"GG","ProductVariantAttributeIds":["1481","7","17","17","15","26","30","30","5","34","34","32","18","18","23","23","1455","13","13","9","1376","1375","1076","1076","21","21","1266","1111","1272","1268","1270","1109","1109","1416","1416","1352","1182","1072","28","28","1113","2538","1316","1316","1212","1202","1156","1350","2516","2536","2534","2530","2528","2524","2522","2412","2410","2408","1477","1487","1487","1458","1363","1404","1404","2545","1077","1284","1230","2520","24","1326","1326","1115","1115","1185","1343","2518","1231","1074","2514","2092","1186","1193","1320","1320","1254","1183","2526"],"FilterItemState":"Unchecked"},{"Name":"P","ProductVariantAttributeIds":["2526","1183","1320","1320","1193","1186","2092","2514","1403","1074","1231","2518","1343","1378","1185","1411","1115","1115","1326","1326","24","1396","2520","1248","1220","1436","1230","1284","1111","1308","1077","2545","2343","1414","1404","1404","38","1363","1458","1464","1487","1487","1477","2047","2114","2408","2410","2412","2522","2524","2528","2530","2534","2536","2516","1350","1202","18","18","1212","1316","1316","2538","1113","1072","1182","1383","1352","1416","1416","1109","1109","1102","1222","42","46","52","39","48","54","28","28","9","13","13","23","23","32","34","34","5","30","30","26","15","17","17","7"],"FilterItemState":"Unchecked"},{"Name":"Único","ProductVariantAttributeIds":["2232","2237","2231","1076","1076","2233","2235"],"FilterItemState":"Unchecked"},{"Name":"M/G","ProductVariantAttributeIds":["1106","1409","1409","1526","1524","1406"],"FilterItemState":"Unchecked"},{"Name":"P/M","ProductVariantAttributeIds":["1406","1524","1526","1409","1409","1106"],"FilterItemState":"Unchecked"},{"Name":"G/GG","ProductVariantAttributeIds":["1409","1409"],"FilterItemState":"Unchecked"}]},{"Id":"2","IsMain":true,"FilterItems":[{"Name":"Preto","ProductVariantAttributeIds":["1271","1448","2494","
Boyko
3 years ago
#10607 Quote
Avatar
  • Moderator
  • 1437
IvanSlater wrote:
The full message is being cut..


Hi Ivan,

It will be best if submit a ticket and provide a link to your website, so that we can investigate and advise.
Regards,
Boyko Stanev
Nop-Templates.com
IvanSlater
3 years ago
#10608 Quote
Avatar
  • 89
Boyko wrote:
The full message is being cut..

Hi Ivan,

It will be best if submit a ticket and provide a link to your website, so that we can investigate and advise.


Done..

https://www.nop-templates.com/HelpDesk/ViewTicket/3331
mkzaman
3 years ago
#12228 Quote
Avatar
  • 20
I have found a bug in ajax filter while testing in base nopCommerce with deafult clean theme. I have unchecked _Show Ajax Filters on Category Page_ option from admin panel.


Then I go to category pages of public store. While I have changed the sort option, the sort order actually doesn't change. You can verify in the images by seeing the _order by_ parameter in the url and the sort option. 


Boyko
3 years ago
#12230 Quote
Avatar
  • Moderator
  • 1437
mkzaman wrote:
I have found a bug in ajax filter while testing in base nopCommerce with deafult clean theme. I have unchecked _Show Ajax Filters on Category Page_ option from admin panel.

Then I go to category pages of public store. While I have changed the sort option, the sort order actually doesn't change.


Hi mkzaman,

That is actually not a bug but expected behavior. Since the Ajax Filters are not integrated on the category pages then the code that sets the Default Sort Order never gets executed.
Please note that the setting of the Default Sort Order works only in the context of the Ajax Filters plugin so without the Ajax Filters it will not work.
Unfortunately nopCommerce does not have a setting to specify the default sort order and without the Ajax Filters plugin the sort order will be the first one (this is how nopCommerce works). If you want to have such a setting with/without the Ajax Filters plugin then you need to suggest this to the nopCommerce team and have them implement it as a general setting for nopCommerce.
There is a similar work item here but you can also suggest your idea in the nopCommerce forum.
Regards,
Boyko Stanev
Nop-Templates.com