We already use umbraco for smaller projects here and I'm thinking of using umbraco for a project that is not ecommerce enabled but has a list of products in one or more categories with a detailed information page but no cart or checkout etc.. it's really informational and used to present a range of products.
I was thinking of 2 approaches and was wondering what other people had done in the past or could suggest!
1. have a sql db with the products in it and product category joins then SOMEHOW? (not sure how to do this in umbraco) create a user control and have it retrieve the products in the cs file and populate a paginated repeater (but then the question I have is how could the user administer the products/categories etc in umbraco if thats possible?)
2. Use a document type of product which has a checkbox list of categories or multiple content picker to allow me to select categories then use xslt for pagination
any comments, thoughts, alternative approaches etc?
if you decide to keep this in SQL you will need to make an admin for it unless that's already inplace. To view products and categories you can write an xslt extension. This is basically a static class with static methods in it. The methods should return a single value or XPathNodeIterator, the XPathNodeIterator is fairly simple to get if you have a dataset or xml document. However, this will hit your sql server on each view so keep performance/caching in mind.
Using a document type of product you can then store categories using tags datatype, but if you need more than just a name for each category - let's say some picture and a category description, you can make a document type for category and then use the Tribal Xpath node relations package, it's ace.
I'm using the document type aproach for a similar setup categorizing travel packages, such as adventure/city/summer etc.
This is how I have configured our tribal xpath node relations datatype for this. As you see from the xpath statement I need to pick destinations categories from various places, there's three different expressions to get all the categories show in the list.
List Products In One or More Categories
Hi All,
We already use umbraco for smaller projects here and I'm thinking of using umbraco for a project that is not ecommerce enabled but has a list of products in one or more categories with a detailed information page but no cart or checkout etc.. it's really informational and used to present a range of products.
I was thinking of 2 approaches and was wondering what other people had done in the past or could suggest!
1. have a sql db with the products in it and product category joins then SOMEHOW? (not sure how to do this in umbraco) create a user control and have it retrieve the products in the cs file and populate a paginated repeater (but then the question I have is how could the user administer the products/categories etc in umbraco if thats possible?)
2. Use a document type of product which has a checkbox list of categories or multiple content picker to allow me to select categories then use xslt for pagination
any comments, thoughts, alternative approaches etc?
Thanks,
Tom
Hi Tom,
if you decide to keep this in SQL you will need to make an admin for it unless that's already inplace. To view products and categories you can write an xslt extension. This is basically a static class with static methods in it. The methods should return a single value or XPathNodeIterator, the XPathNodeIterator is fairly simple to get if you have a dataset or xml document. However, this will hit your sql server on each view so keep performance/caching in mind.
Using a document type of product you can then store categories using tags datatype, but if you need more than just a name for each category - let's say some picture and a category description, you can make a document type for category and then use the Tribal Xpath node relations package, it's ace.
I'm using the document type aproach for a similar setup categorizing travel packages, such as adventure/city/summer etc.
Hth,
Harald
Hi Harald,
to do adventure/city/summer etc do you have the category doc type and are usign tribal xpath node relations?
Yes, exactly.
This is how I have configured our tribal xpath node relations datatype for this. As you see from the xpath statement I need to pick destinations categories from various places, there's three different expressions to get all the categories show in the list.
Harald :-)
is working on a reply...