Discussions

Basic product table/grid in views

First of all, really great work, D7 and Commerce is very exciting!

I would like to create a basic customer facing table or grid of products in views.

If I create a view as a "node", I can show a grid view with Title linked to display node, and add to cart button from the prod ref field. So that is fine, however I am not sure how to show the image for each product in this view.

If I create a view as "Commerce Product", I seem to link to the admin product page and not the customer facing display nodes.

Which is the correct approach, and if node view is, how best to display the product image.

Posted: Jan 18, 2011

Comments

CrazyDiamond (not verified) on February 27, 2011

Hi!

I want to join that question - i've made Product entity View and now i can't link from it to product nodes. Link to content option of View and same option of image field in Product entity, links me to administration page of a product entity, it isnt accesible by users.

Ryan, which approach you have used in your demo site?
All i want to do is simple store like that demo)

And thank you for the great job;)

Scott J on February 27, 2011

CrazyDiamond,
The demo store doesn't even use Views at all. What you see is just the default taxonomy list pages. The menu entries in the Catalog block just have links to taxonomy/term/1 taxonomy/term/2 etc.

If you need/want to use Views, you can just use plain old 'Node' view type.

pairodime pairodime on January 4, 2012

If I am following this correctly - you would like to display a grid of products with Title, Image and Add to Cart Button.

I was able to do this using the Relationships Reference = Content: Product

This gave my fields more data to work with. From here I was able to add (Product) Field: Image

You can see a sample here: http://macmeat.omnicart.net/

firmadani firmadani on April 14, 2012

helo pairodime, at first 'Relationships' 'Product References' brings all commerce related product fields available, especially images field. But when I insert field product images, it link to product admin page and not link to product display page.

So, my solution is to replace destination URL by add 'Node: link' field as URL replacement for image field by overwrite result of image field, so when i clieck will go to product display page, not product admin page. Not so elegant I know, but it works for me.

Here is my catalog example : http://www.dr-mode.com

drupalcommerce Check out the #Drupal Commerce 2.x Roadmap to see where you can get involved: http://t.co/WAc3jmXY2a
drupalcommerce A new blog discussing the new showcase listing http://t.co/FHOzhAg3tl http://t.co/J5C87imjhb
drupalcommerce RT @drupalcon: Thanks @CommerceGuys and @CommerceJohn for your support, and for #CommerceKickstart! Take the tour http://t.co/ivKEYH7k0o
drupalcommerce Updating our extensions directory: 665 new or updated modules, distributions, sandboxes, & themes. http://t.co/6NMMofYo12 #weloveyouguys