User posts

one year ago

On step 2 of the plugin docs, it says to install that package on your salesforce account, but when I click that link, I get this message:

"This app can't be installed.
There are problems that prevent this package from being installed.
Package Not Found  The requested package doesn't yet exist or has been deleted. If this is a recently created package version, please try again in a few minutes or contact the package publisher."

I'm using a developer salesforce account for testing.

2 years ago

SDobrev wrote:

The price filter is not available on the search page and this is by plugin design.

Ok, I did eventually notice the spec attribute filter appear, so I guess everything is working as expected for me. Thanks!

2 years ago

Also, for more info, I do see the <div class="nopAjaxFilters7Spikes"> placeholder but it is empty

2 years ago

I'm having the same issue, wouldn't the price filter at least be there if it works on the category pages? Also, I'm using the trial version if that matters.

For other people, to get the categoryId after the ajax is called, I used this...

var filterData = System.Web.Helpers.Json.Decode(Model.SpecificationFilterModel7SpikesJson);
product.CategoryId = filterData.CategoryId;

I added this block to the plugin's CategoryTemplate view, right before the call to the _ProductBox partial.  This was the only way I could find to get the categoryId after the ajax call is made. Then the _ProductBox partial calls a child action that takes the productId and categoryId and just returns the PictureModel.

Boyko wrote:
Forgot to answer your question.

You can get the category id from the route data in the view like this:


But I am not sure if the category id will be available in the route data when the ajax requests are made.
You can give it a try and let me know.

Unfortunately, the categoryId is not available when the ajax requests are made.
Is there a category id in this model? SevenSpikes.Nop.Plugins.AjaxFilters.Models.ProductsModel

I agree that it would be best to do it when I prepare the model, is there anyway to do that without changing the plugin source? Just to clarify, everything works correctly when I go to a category, the correct picture for that category is chosen. It is only when I apply a filter, then it just returns the first product picture, because obviously the plugin doesn't know about my new functionality.

I was looking at _ProductBox to do an ajax call or something, but I won't have the categoryId in ProductOverviewModel if the model is prepared through the plugin. One thing I thought was before the call to  @Html.Partial("_ProductBox", product, maybe set product.CategoryId equal to the CategoryModel's id. Does this plugin use the normal CategoryTemplate.ProductsInGridOrLines view, or is there a separate view that I would have to change this in? Thanks for your help.

So I made some functionality to assign an image to the Product-Category mapping so when you view a category, you can get specific pictures to show as the default. (I sort of cloned "PrepareProductOverviewModels" to take a categoryId so that it can choose which image it should show).  My problem is the ajax filters plugin obviously ignores the categoryId.  Without having the source, is there anything that I can do to get the plugin to include this functionality?  When I added the categoryId to "PrepareProductOverviewModels", I noticed it broke the plugin(because of signature I'm guessing), so is there any way to get your plugin to call my other version of "PrepareProductOverviewModels" with the categoryId?

This started as a PM, so here's Boyko's response...
Please refer to this post of how to properly modify the CatalogController without making any breaking changes, so that the Filters can work.

Thanks for the response Boyko, but I was able to make the change without breaking the plugin (I have two functions that both funnel to a third one). My question was more if there is any way to get the plugin to utilize my version with the categoryId.  Since I can't modify the source to call my version with the extra categoryId parameter, can something be done in the views? Maybe an ajax call that passes the productId and categoryId to swap out the images? My question with that is where can I even access the categoryId from?  Any ideas here? Thanks.