Page 1 of 1
Filtering on Fields from Product Templates
Posted: Thu Dec 18, 2008 4:52 pm
by efficiondave
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...
Re: Filtering on Fields from Product Templates
Posted: Thu Feb 12, 2009 4:07 pm
by jozburn
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.
Re: Filtering on Fields from Product Templates
Posted: Thu Feb 12, 2009 4:29 pm
by nickc
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"]);
Re: Filtering on Fields from Product Templates
Posted: Wed Mar 11, 2009 10:25 pm
by bemara579
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.
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 10:11 am
by rhkittredge
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-
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 10:28 am
by Khaliq
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.
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 10:42 am
by nickc
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.
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 11:04 am
by Khaliq
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.
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 4:42 pm
by rhkittredge
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-
Re: Filtering on Fields from Product Templates
Posted: Wed Jun 10, 2009 10:19 pm
by nickc
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).
Re: Filtering on Fields from Product Templates
Posted: Thu Jun 11, 2009 6:28 am
by rhkittredge
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-
Re: Filtering on Fields from Product Templates
Posted: Thu Jun 11, 2009 6:53 am
by nickc
http://www.oemsalescenter.com
Site navigation via ProductTemplateFields. Able "Category" objects are not used.