Filter Products

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Filter Products

Post by cgreathouse » Thu Mar 19, 2009 5:27 pm

First I must say how impressed I am with the responsiveness of this forum. I've never seen a forum where questions get answered so quickly. :D

Now for my question:

I'm looking how to filter products based on group. I've already made the changes on the admin side for keeping track of what products are visible to what groups. Now I just need to modify the user side. I know what products should be visible for a given user, I just need to know where to filter out products.

Anybody have any pointers on what needs to change on the user side to prevent products from being displayed?

Thanks!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Filter Products

Post by mazhar » Fri Mar 20, 2009 5:47 am

Perhaps you need to write custom queries to filter products. Read following WIKI topics about DAL.
http://wiki.ablecommerce.com/index.php/ ... cess_Layer
http://wiki.ablecommerce.com/index.php/Custom_Queries

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Filter Products

Post by cgreathouse » Fri Mar 20, 2009 8:06 am

Yes, I've looked at those. I'm using the DAL for the admin side of things. I've already made the changes that will allow an admin to specify the products that are visible for a particular group. Now I just need to do the actual filtering.

What I'm trying to find is what AbleCommerce file(s) need to be changed to do the filtering. I'm trying to find where to make the changes but I'm not having any luck.

Can you point me in the right direction?

Thanks!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Filter Products

Post by mazhar » Fri Mar 20, 2009 8:18 am

The changes will most probably in ProductDataSource class's methods. As this class is in an API class so for this you will need API source code. The other solution is to write you custom code to filter products and then update Category pages to use that code.

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Filter Products

Post by cgreathouse » Fri Mar 20, 2009 8:39 am

"...The other solution is to write you custom code to filter products and then update Category pages to use that code...."

Yes, that's what I'd like to try. I browsed through some Category pages and I'm not seeing how Products are getting loaded. Am I just not seeing it? Can you point me to a specific location where I can override how Products are loaded for a Category?

Thanks again!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Filter Products

Post by mazhar » Fri Mar 20, 2009 8:48 am

For example in ConLib/CategoryGridPage.ascx.cs file following line is loading products

Code: Select all

ProductList.DataSource = ProductDataSource.NarrowSearch(_Keywords, this.CategoryId, _ManufacturerId, 0, 0, _PageSize, (_HiddenPageIndex * _PageSize), SortResults.SelectedValue);

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Filter Products

Post by cgreathouse » Fri Mar 20, 2009 9:19 am

YES!!! That's what I was looking for.

Thanks!

Post Reply