Filtering on Fields from Product Templates

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
efficiondave
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Tue Dec 02, 2008 10:20 am
Location: St. Louis Missouri
Contact:

Filtering on Fields from Product Templates

Post by efficiondave » Thu Dec 18, 2008 4:52 pm

I'm curious if there's any built in mechanism to allow users to filter on fields from the Product Templates. So for example, if a user was only interested in TVs with HDMI inputs, is there a way for them to only view TVs with that feature. Or say you sell computer monitors and the user only wants to see 22" or 24" monitors...

It seems they can use Advanced search and type in HDMI and check the description box, that will work but I'm looking for something more obvious...

jozburn
Ensign (ENS)
Ensign (ENS)
Posts: 9
Joined: Tue Nov 18, 2008 11:39 am

Re: Filtering on Fields from Product Templates

Post by jozburn » Thu Feb 12, 2009 4:07 pm

Just curious if you or anyone else ever determined a solution for this. I'm looking to implement the same feature for an upcoming project.

Thanks.

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Filtering on Fields from Product Templates

Post by nickc » Thu Feb 12, 2009 4:29 pm

Built in? no - but Product Templates are very useful and extensible.
I've built a wrapper class to expose those fields:

Code: Select all

public class ExtendedProduct
    {
        public ExtendedProduct(int productId)
        {
            this.Product = ProductDataSource.Load(productId);
        }

        public ExtendedProduct(Product product)
        {
            this.Product = product;
        }

        public Product Product { get; set; }

        public string this[string moniker]
        {
            get
            {
                try
                {
                    return this.Product.TemplateFields.Find(delegate(ProductTemplateField t) { return t.InputField.Name == moniker; }).InputValue;
                }
                catch
                {
                }
                return null;
            }
        }
     }
So if you had template "Monitor Size"...

Code: Select all

ExtendedProduct _xp = new ExtendedProduct(_productId);
Response.Write("The selected monitor size is " + _xp["Monitor Size"]);

bemara579
Lieutenant (LT)
Lieutenant (LT)
Posts: 63
Joined: Thu Feb 19, 2009 6:15 pm

Re: Filtering on Fields from Product Templates

Post by bemara579 » Wed Mar 11, 2009 10:25 pm

Definitely a defacto in Ecommerce 2.0 by now. I too plan on building a filtering feature on the product templates (but got some template import issues I have to deal with first).

Take a look at this open source shopping cart.. the filtering is exactly what I plan to do:
http://demo.magentocommerce.com/apparel/shoes

eBay does a nice job of this too:
http://photography.shop.ebay.com/items/ ... acatZ31388

I agree that the product templates in AbleCommerce are not being exploited enough. Hopefully someone can get this started and help it grow in here. I am definitely on board.

rhkittredge
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Wed Jun 10, 2009 10:03 am

Re: Filtering on Fields from Product Templates

Post by rhkittredge » Wed Jun 10, 2009 10:11 am

bemara579 wrote:Definitely a defacto in Ecommerce 2.0 by now. I too plan on building a filtering feature on the product templates (but got some template import issues I have to deal with first).

Take a look at this open source shopping cart.. the filtering is exactly what I plan to do:
http://demo.magentocommerce.com/apparel/shoes

I agree that the product templates in AbleCommerce are not being exploited enough. Hopefully someone can get this started and help it grow in here. I am definitely on board.
I looked at the demo site you provided (MagentoCommerce) and the filtering capability is EXACTLY what I am looking for as well. You mentioned you might build this functionality into your site, have you done so yet, and if so how difficult was it? Are there possibly any third-party add-ons for this capability?

-Rob-
Last edited by rhkittredge on Wed Jun 10, 2009 4:39 pm, edited 1 time in total.

Khaliq
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 26
Joined: Tue Dec 16, 2008 2:00 am

Re: Filtering on Fields from Product Templates

Post by Khaliq » Wed Jun 10, 2009 10:28 am

Do you mean something like the shop by feature we have implemented for musthavebag.com
http://www.musthavebag.com/bags-C48.aspx

This has been done using product templates.

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Filtering on Fields from Product Templates

Post by nickc » Wed Jun 10, 2009 10:42 am

Like that, but in combination. You should be able to view the intersection of size=medium&leathertype=plush, not just jump from inputchoice to inputchoice.

Khaliq
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 26
Joined: Tue Dec 16, 2008 2:00 am

Re: Filtering on Fields from Product Templates

Post by Khaliq » Wed Jun 10, 2009 11:04 am

nickc wrote:Like that, but in combination. You should be able to view the intersection of size=medium&leathertype=plush, not just jump from inputchoice to inputchoice.
It could be a good addition.
This was not our client's requirement but it can be done as well.

rhkittredge
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Wed Jun 10, 2009 10:03 am

Re: Filtering on Fields from Product Templates

Post by rhkittredge » Wed Jun 10, 2009 4:42 pm

Since there doesn't appear to be an add-on capable of doing the type of filtering I'm looking for, I'm going to write my own for our site. Does anyone have any ideas on the best way to accomplish this task - i.e. should I use the API (is it even possible?) or should I interface directly with the tables to do the filtering?

Thanks,

-Rob-

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Filtering on Fields from Product Templates

Post by nickc » Wed Jun 10, 2009 10:19 pm

When I built this (sorry, code is not shareable), I moved and extended (added descriptive text, images, additional properties) the data in ac_InputFields, ac_InputChoices and ac_ProductTemplateFields to my own tables, then built a data layer over those objects. This allows me to swap out Able as the engine at a later date and keep the data layer code intact. Any InputField added with "FILTER" in the name will automatically generate a new browseable classification, and the UI supports the notion of "hidden" filters whose members are selected programmatically as opposed to being selected in the UI (in my case, the primary filter is set by the host header used to access the site). I also added support for "mirroring" one filter/filter item/item to another so there is some capacity for multi-homing (which Able does not support in Product Template fields).

rhkittredge
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Wed Jun 10, 2009 10:03 am

Re: Filtering on Fields from Product Templates

Post by rhkittredge » Thu Jun 11, 2009 6:28 am

nickc wrote:When I built this (sorry, code is not shareable), I moved and extended (added descriptive text, images, additional properties) the data in ac_InputFields, ac_InputChoices and ac_ProductTemplateFields to my own tables, then built a data layer over those objects. This allows me to swap out Able as the engine at a later date and keep the data layer code intact. Any InputField added with "FILTER" in the name will automatically generate a new browseable classification, and the UI supports the notion of "hidden" filters whose members are selected programmatically as opposed to being selected in the UI (in my case, the primary filter is set by the host header used to access the site). I also added support for "mirroring" one filter/filter item/item to another so there is some capacity for multi-homing (which Able does not support in Product Template fields).
Thank you for the information! I sort of figured it would be best to create my own DAL for this filtering capability. Would it be possible to supply a URL so we can take a look at the site you created that shows your filtering code in action? I'd just be interested to see how it looks when interfaced with Able.

Thanks-

-Rob-

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Filtering on Fields from Product Templates

Post by nickc » Thu Jun 11, 2009 6:53 am

http://www.oemsalescenter.com
Site navigation via ProductTemplateFields. Able "Category" objects are not used.

Post Reply