6 replies [Last post]
mustardman's picture
Offline
Joined: 11/05/2008
Juice: 66
Was this information Helpful?

I have been trying to wrap my head around creating a custom catalog. I keep reading of people using views to create a custom catalog but never an explanation how. I just can't figure out how to do it on my own. I have taught myself how to set up Views2 but it just doesn't seem to get me all the way to where I want to be. There must be more to it.

Can anyone help?

mustardman's picture
Offline
Joined: 11/05/2008
Juice: 66
Re: Anyone have a recipe for a custom catalog?

Update, I have also learned how to use CCK to create a new content type called Catalog. Still can't get it to where the uc_catalog get's me. I need to get there before I can go beyond.

Basically what I am trying to do is include products and story content types (among others) into a Catalog. I want to do it exactly the same way uc_catalog does. The problem with uc_catalog is it ONLY works with the product content type. Is there a simple hack perhaps?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Anyone have a recipe for a custom catalog?

Not a full answer, but you actually need to be using Views instead of CCK for this...

mustardman's picture
Offline
Joined: 11/05/2008
Juice: 66
Re: Re: Re: Anyone have a recipe for a custom catalog?

As far as I can tell I need 2 things. I need a content type which I called "catalog". I also need a Views "Node view: catalog" to display the "catalog" content type as a grid catalog exactly like how uc_catalog displays it. That is all fine and dandy but when I want to get into a hierachy of catalogs/subcategories it get's kind of awkward. That is why I would prefer to use uc_catalog which seems to do that part quite well.

Ubercart seems to be kind of non-drupalish in how it does it. There is no "Catalog" content type and no Views "Node view:uc_catalog" which would be the drupalish way to do it (in my non-programmer, non-expert opinion).

Ubercart appears to use Views to do it but the hooks are not exposed to the Administrator. I need access to the hooks somehow. IMHO if catalog was made more drupalish (ie, with the hooks exposed via CCK/Views UI) it would be more versatile and configurable. Just my opinion but I am not a programmer. I am sure it is designed this way for good reason but it is definitely a limitation for what I have in mind.

manatwo's picture
Offline
Joined: 02/19/2008
Juice: 235
Re: Anyone have a recipe for a custom catalog?

The quick and dirty: When you create a new view, your "View Type" will determine what the view ends up looking like. There's no grid view available by default, but it is part of the Views Bonus Pack. When you select that particular view type, you have the option of choosing the different fields that it'll display (Product Name, Price, Image, etc.) and the filters, which determine the selection of nodes the view pulls from - ie, pulling from all products of a certain type or taxonomy.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Anyone have a recipe for a custom catalog?

Just to add on, I'm not sure where you got the idea that you need a "Catalog" content type - the content type you'll be referencing in your view is Product, which exists when you enable Ubercart.

Views is fairly simple to use, although it's quite powerful which can (and does) lead to banging of head against desk Smiling If you'd like I can create a custom Catalog View for you, which you could then Import into your own Views and modify as you see fit.

--
Help directly fund development: Donate via PayPal!

mustardman's picture
Offline
Joined: 11/05/2008
Juice: 66
Re: Re: Anyone have a recipe for a custom catalog?

Thanks for the responses guys. I have been banging my head against my desk for the past week on this but at least I am learning a lot!

Just to re-iterate. I will be using D6, ubercart 2. Views 6.x has grid view built in. No need for bonus pack.

uc_catalog module works very well and is pretty much exactly what I need. Only thing I need changed is I want it to be able to reference more than just "product" and "product kit" content. I want it to also reference "book", "story", "blog" etc.

I have pretty much determined the best way to do that is modify uc_catalog. I understand the issue of uc_catalog being overwritten each time ubercart is updated and requiring modification each time. I am prepared to deal with that. Can anyone give me a hint how I can go about modifying the uc_catalog script to show more than just the product content types? Looks like it won't be that hard but I am not a coder.