Close

Nop Ajax Filters Not Working show a pop up box with message :-Loading the page failed

Support
10 years ago
#3879 Quote
Avatar
  • Moderator
  • 1044
pvinit wrote:
Hi

I am Still Waiting for reply for my last post and i also tell me that how to show a filtered attribute with (Remove) link on page. it's possible or not?

Please Reply

Regards,
Pvinit


Hi,

in order to show a "Remove" link, you can achieve that but you should make customization to the views. Please have a look at the example below for an attribute, it will be the same for specifications and manufacturers filters.

Edit the AttributeFilter.cshtml view to add a <span> for the remove text:

<a class="@filterItemCssClass" data-option-ids="@productVariantAttributeIds" data-optionsGroupId="@String.Concat(attributeFilterGroup.Id, "-", attributeFilterItem.Name)">@attributeFilterItem.Name<span class="remove-text">Remove</span></a>

and add the following css to the AjaxFilters.css file:

.remove-text
{
float: right;
}
.filterItemUnselected .remove-text
{
display: none;
}

Hope that helps!
pvinit
10 years ago
#3882 Quote
Avatar
  • 27
Hi
Thank You for Reply,

How to do this :- show a filter selected value in a one string in which all selected attribute are  concate with remove link. by above example code it's add a remove link in to drop down with attribute name.

if i select color Red and size 8  then it's show after filter like this : - Red(x) - 8(x) , Here x is remove link.

suggest

Regards
pvinit
10 years ago
#3886 Quote
Avatar
  • 27
Hi,

Waiting for Your Reply ,

Regards.
Boyko
10 years ago
#3888 Quote
Avatar
  • Moderator
  • 1570
pvinit wrote:
Hi
Thank You for Reply,

How to do this :- show a filter selected value in a one string in which all selected attribute are  concate with remove link. by above example code it's add a remove link in to drop down with attribute name.

if i select color Red and size 8  then it's show after filter like this : - Red(x) - 8(x) , Here x is remove link.

suggest

Regards


Hi Pvinit,

This is not possible with the current version of the Ajax Filters. This idea was already proposed in our user voice portal, so you can vote for it here.

Thanks
Regards,
Nop-Templates.com Team
pvinit
10 years ago
#3975 Quote
Avatar
  • 27
Hi,

When i am trying to filter by price and use other filters and pass a pagesize by url that does't work?
how to pass a pageSize by url in parameter?
for ex:-
url with filter value:- www.xxxxxx.com/notebook#/pageSize=30&viewMode=grid&orderBy=15&pageNumber=1

and i have a link on view page which pass a url:- www.xxxxxx.com/notebook#/pageSize=1000

now when i click on any filter then new url is :- www.xxxxxx.com/notebook#/pageSize=30&orderBy=11&pageNumber=1

in catalog pageSize(comma spereted ):- 30,1000
so how can i pass a pageSize 1000 by link and it add in a parameter ?

suggest how to do?

Regards
iliyan.tanev
10 years ago
#3997 Quote
Avatar
  • Moderator
  • 347
Hi Pvinit,

you are on the right way, the only think you need to do is to add the pageSize you want to pass in the drop down with the page sizes.

You could do this from Admin panel -> Catalog -> Categories

  1. Select the edit button for the category you need
  2. From there go to SEO tab
  3. There should be an text field with label "Page Size options"
  4. Just add your pageSize here and it should work for the specified category.

Hope this helps!

Regards.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
pvinit
10 years ago
#4021 Quote
Avatar
  • 27
Thank you for reply

i already set values in category - 6,1000

i don't want to select pageSize from dropdown, i want to change pageSize by url

When i change url it don't work
in url i just change pagesize values rest parameter are as it is.

but when page load url not getting my new value(which i entered manually) it takes that old value which is by default.

how to stop this, i mean how to i allow my manual enter value.

regards.
iliyan.tanev
10 years ago
#4023 Quote
Avatar
  • Moderator
  • 347
Hi,

You don't need to select pageSize from drop down, you just need to have it there.
It works fine for me, for specific category, with the steps described above.
Could you give me your steps ?

Thanks.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
cyberspy
10 years ago
#4055 Quote
Avatar
  • 9
Support wrote:


Please note that all our products are guaranteed to work only for the official nopCommerce release and not custom builds.

I see that you have added a new parameter and that is why the Nop Ajax Filters throw an error as they rely on this method. Even if you make the parameter to be an optional, this will not work as this is a breaking change.



I have extended the same method (PrepareProductOverviewModels in CatalogController) and have the same problem.

Your response however is most disappointing. I understand that your plugins are only guaranteed to work on the official release, it seems you have made a decision to deliberately force the method to remain standard, rather than allow developers to extend it and then take responsibility for the consequences.

If I create another PrepareProductOverviewModels, with all the same optional parameters as the original, and with one more, then when the method is called with only a few methods, then it  causes an "The call is ambiguous between the following methods or properties:" error when building.

I've added the following method, to keep jCarousel plugin happy and added the extra parameter to the original method and used a default value in the new method ( the extra 0 after forceRedirectionAfterAddingToCart)


        [NonAction]
        protected IEnumerable<ProductOverviewModel> PrepareProductOverviewModels(IEnumerable<Product> products,
            bool preparePriceModel = true, bool preparePictureModel = true,
            int? productThumbPictureSize = null, bool prepareSpecificationAttributes = false,
            bool forceRedirectionAfterAddingToCart = false)
        {
            return PrepareProductOverviewModels(products, preparePictureModel, preparePictureModel, productThumbPictureSize,
               prepareSpecificationAttributes, forceRedirectionAfterAddingToCart, 0);
        }

So far, I've been very impressed with the quality of your plugins and themes, but this has really knocked my confidence in my ability to use your plugins and to continue to extend nopCommerce.

Surely there must be a better way of doing this?
Boyko
10 years ago
#4056 Quote
Avatar
  • Moderator
  • 1570
cyberspy wrote:


So far, I've been very impressed with the quality of your plugins and themes, but this has really knocked my confidence in my ability to use your plugins and to continue to extend nopCommerce.

Surely there must be a better way of doing this?


Hi cyberspy,

If you explain what you would like to achieve exactly then we will be able to advice and to return your confidence back :)
As stated before it is a breaking change to add new parameters to a method no matter if it is an optional one or not. Our plugins rely on these methods and you should not change them if you want the plugins to work.
Please let us know what exactly your goals are and we will help.

Best Regards,
Boyko Bonev
Nop-Templates.com Team
Regards,
Nop-Templates.com Team