Click here to Skip to main content
15,885,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have list of products with Brand wise
[Spam link removed]

This Brand has the different category and Pack of Items, price and etc
How to create and bind filter for this

Like [Spam link removed]

I have click the video-players, selection on video-players showing all Brands and Type and color

Currently i have one ProductView Model which contain the Product and product details

Please guide me How to do this .

Thanks in Advance :)
Posted
Updated 17-Sep-15 1:29am
v2
Comments
Thanks7872 17-Sep-15 7:30am    
Don't post links like you did. No one is interested in visiting links that way. You have been given enough space to express your concern. Repeating the same will result in account deletion.

Public class FeaturedProduct :ActionFilterAttribute
{
Private DBEntities _entities = new DBEntities();
public override void OnResultExecuting(ResultExecutingContext context)
{
var viewData = context.Controller.ViewData;
viewData["featured"] = GetRandomProducts();
}

private iList,product> GetRandomProducts()
{
var rnd = new Random();
var allproducts = _entities.Products.ToList();
var featuredProducts = new List,product>();
for (int i = 0; i < 5; i++)
{
var product = allproducts[rnd.Next(allProducts.Count)];
allProducts.Remote(product);
featuredProducts.Add(product);
}
return featuredProducts;
}
}
 
Share this answer
 
Well, I cannot do this much coding for you, which is something you should do on your own.
But here's the things:

1. The first thing, you need to consider the PartialView for this.

2. List out all the products and filter them according to the Category selected. You can make excellent use of Isotop[^] plugin.

3. Get the category wise minimum & maximum price and using Range Slider[^] give a range of price of that particular category. Now on changing the slider, you can filter the products within that range show them using PartialView.

4. And you can use the Checkboxes for the colors.

Hope you got the idea. :)

-KR
 
Share this answer
 
v2
Comments
anil_bang0011 17-Sep-15 1:20am    
Yes, right nobody doing coding for me. I am doing the same.. Thanks to your suggestion. I really appreciate your effort :) (Y)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900