Hi All,

I want to use drupal commerce, but this one task seems quite elusive to me though it was very easy to setup in ubercart.

The basic idea is that I'm setting up a website where you can buy a special digital item (not a download or anything, I'll build a javascript or flash RIA which pulls in the item images and uses them). I was hoping to accomplish this with Services + Drupal Commerce + Views. I made a new content type for the digital item in CCK. I made a new product type which requires a reference to one of the digital item nodes.

I made an instance of this product+item pair, setup a customer and created an order for them which contained the item purchase.

Now, for the life of me I cannot get a view working where I can display all the purchased items for a user. I can't seem to even mix the Commerce world with the standard Drupal content world in a View. This task doesn't seem like it would be too unusual, but I'm lost. Any guidance would be very appreciated.

(If I can't get it working in drupal commerce, it's back to ubercart for me. :( . This module seems so much cooler and more future oriented).

Thank you

Comments

mikerz’s picture

Priority: Critical » Normal
pcambra’s picture

Hi,

With the current views integration of commerce you can get really really far displaying data with a basic understanding of how commerce entities are structured.

For the use case you're asking, you'd need to create a Commerce Order view, and then create a couple of relationships, one for the Order owner and other for the Line items affected, once done this, you have to add a new relationship for Commerce Products (related to line items) and then you've obtain a view with the elements you wanted, orders, people and products, now you've just have to display the correct fields of the products and filter for the order statuses and all you need.

Hope it helped.

mikerz’s picture

Thank you!
I've been able to get it working.

pcambra’s picture

Status: Active » Fixed

Marking as fixed then :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.