User login

Login/Register
To prevent automated spam submissions leave this field empty.

Drupal Questions

Question asked by adrianmak on Thursday, April 9, 2009

Using views to replace ubercart product listing

Ubercart has it own module to handle product listing. Is it possible to implement my own product listing (for replacement the original ubercart product listing) thru Views (I’m using drupal6)?
with various of product content type, catalog terms.

And also if product listing is implemented by views, is there will be any features are missed which are provided by original ubercart’s product listing

Answers (13)


Login or register to post answers
ziobudda's picture

Do you talk about

Do you talk about “products/” page ? If yes, this is a view. Clone it and change what do you need.

If you don’t talk about “products” page: sorry.

M.

ziodrupal.net sviluppo siti web Drupal CMS

No. I mean the catalog/

No. I mean the catalog/ page (i.e. this is not a view actually). For example catalog/book, catalog/dvd, catalog/mp3 will list all products on book or dvd or mp3

Can I use a views to replace the original catalog/ page ?

ziobudda's picture

Ah, yes. Catalog is a

Ah, yes. Catalog is a taxonomy, so if you want to create a view of “mp3” nodes you need to create a view of “node” type and in the Filter section add a “Taxonomy: Term” filter (choose mp3 term).

M.

ziodrupal.net sviluppo siti web Drupal CMS

leviks's picture

Ubercart have such thing as

Ubercart have such thing as catalog of the taxonomy and product_grid, which it can show in one page depends on situation.

So, if you need to change a displaying product grid in “catalog” section, you may include to template.php code such as:

function phptemplate_uc_catalog_product_grid($products) {
if(is_numeric(arg(1))) {
return views_embed_view(‘products’, ‘default’, arg(1));
}
return views_embed_view(‘products’, ‘default’);
}

The string ‘products’ – is a name of my view.

Best,Viktor

Lightflows's picture

Viktor, this solution above

Viktor, this solution above works great, my views get integrated into the poduct catalog, just one thing the taxonomy term is not getting ‘passed’ so all my catalog views have the same products in them.

Any help much appreciated.

Thanks

Hix

WebNewCastle's picture

I realize this is a dated

I realize this is a dated question, but in case someone else stumbles across this like I did …

It is actually very simple to do what was asked without any PHP. If both Ubercart and Views are installed, there will be a default catalog View which can be customized. I’ve posted in the past on my site about doing even more with additional Views, Imagecache, and CCK, etc., but the simple answer to “taking control” of the catalog display is to simply edit the catalog View.

And I am not aware of anything provided by the default catalog module and display that would not also be available under the catalog view.

Jay August's picture

Sorry to kick and old thread

Sorry to kick and old thread but:

but the simple answer to “taking control” of the catalog display is to simply edit the catalog View.

Am I stupid here? I can’t seem to find a ‘catalog’ view, only a ‘products’ view?

What am I doing wrong here? Thanks for any assistance!

JayI also am having trouble

Jay

I also am having trouble finding the ‘catalog’ view. Am searching the Ubercart forums and such but no luck so far.

Post back if you find something.

WebNewCastle's picture

Well. Hmm. I am going to

Well. Hmm. I am going to have to apologize because I am not seeing it either. I could have sworn there used to be a uc_catalog view (disabled by default) when both the Catalog and Views modules were installed. At least … I don’t think I’m going crazy.

In its absence you can still do this in Views without too much trouble – it’s kind of a cross between the products View and the taxonomy View (disabled by default).

Jay August's picture

Yes, that should work. I'm

Yes, that should work. I’m not 100% sure how I’ll let the Catalog navigation block and my new-to-create view communicate with eachother. Sounds like an attached view and exactly that is not very much of a profession of me….

Well, at least I know i’m not going mad here :) If I can just add a product description and Qty input to my table, im a happy man…!

matshep1's picture

I think this may have been

I think this may have been in an older version?

Anyway here’s a link to handy article about creating a catalog view .

I believe there should be a way to override the default catalog view with a page-catalog.tpl.php file too?

Mat :)

@matshep1, I read the

@matshep1, I read the article some days before.

I’m curious if setting up my own taxonomy terms and vocabs in drupal taxonomy page instead of uubercart product catalog, will google analytics e-commerce module know to keep tracking e-commerce data by catalogue ?

Jay August's picture

Well, I tried the code from

Well, I tried the code from CommerceGuys website and it works quite well, but… it doesn’t ‘replace’ or ‘communicate with’ the current catalog view. The problem is a bit weird. when I view the catalog like I usually did, I get a URI like www.example.com/catalog/productcat/subcat/sub-subcat and my view is still as it was in my current state.

but, when I change that URI to a ‘real’ taxonomy URL, I get the edited view from CommerceGuys:

www.example.com/taxonomy/term/59

So now I have a Catalog Navigation in my Block, that leads to the wrong (old view)... At least I’ve learned how to edit a view to overwrite the catalog view :)