Is the integration with views complete ?
how can one include the options in the view (cart / checkout / order messages) ?

Comments

hunziker’s picture

Status: Active » Postponed (maintainer needs more info)

We use the entity api. So most of the data should be accessible by views. Can you describe in more detail what you want to do? If you want to show up the data in the cart view, then you can use the "Attribute Field" in the line item entity.

giorgosk’s picture

I was able to put the options in the line item (add to cart form)
but I could not get them in the cart display / or on the checkout etc

hunziker’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

As I wrote you need to edit your cart view. Use the "Attribute Field" of the line item entity.

miiimooo’s picture

Status: Closed (fixed) » Active

Sorry this may be obvious but do you have any idea why it (product attributes) isn't available in the Orders view?

olafkarsten’s picture

Status: Active » Fixed

Miiimoo - what do you mean, with "isn't available? You need to enable the field 'Commerce Line Item: Product Attributes' in all views, where you want to show the product attributes.

miiimooo’s picture

Hey thanks for answering and following up. Problem is I've switched to ubercart now because of my requirements. I also think my database was a bit messy because I tried out dev versions. I guess it's until the next project that I get to play with commerce again.

Status: Fixed » Closed (fixed)

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

aminalid’s picture

Sorry this may be obvious but do you have any idea why it (product attributes) isn't available in the Orders view?

In the Commerce Order view, you need to add the "Commerce Order: Referenced line item" relation in the "Relationships" section of the view.
This will allow you to add fields from the Commerce line item entity. Don't forget to use the relationship when configuring the added field.

But even though i managed to display the attribute field "Commerce Line Item: Product Attributes", the output is not useful. The field displays a linked line item title and all line item fields, where the expected display should only view information about product option fields formatted.

bendev’s picture

See the patch I proposed here to remove the price
https://drupal.org/node/1322632

Rosamunda’s picture

I have the same problem about Attributes: I can´t get to actually see the user´s option.
But in my case I can´t see anything. I´ve followed all instructions about how to set the view with the relationship, but the view won´t show anything.
Anyway, shouldn´t the order view show the attributes too? Because in my case it won´t.
Thanks for your help!

1kenthomas’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Closed (fixed) » Active

Same issue in essence. Have added per above but not showing on site. Will update if I find the problem, which could be the client site, but there are enough reports of problems above, to make me worry... and re-open.

bluesman2014’s picture

I have the same issue. Followed all the steps, I can add fields pointing to each option in views, but nothing shows up in the results.

Anonymous’s picture

@1kenthomas & bluesman2014: Assuming you are using the 2.x branch: have you added relationships to the commerce options in your view? First you need to add a relationship, afterwards you can add the fields in your commerce option to the view, using this relation.

bluesman2014’s picture

Hi @samspinoy, thanks for your reply. I'm still using the 7.x-1.0-beta2 branch. I tried upgrading to the 2.x but then I was no longer able to access the option sets I had created (I kept getting "the site has encountered an error"). Now I've resored the 1.0-beta2, I can now access my option sets again, but the fields that linked to them are broken, so I'll have to create them again.

But to answer your question, yes, I added the relationship to the commerce options in my view. I then added fields for the relevant options using this relation, but nothing appears in the preview below (even though the other fields are clearly appearing).

Anonymous’s picture

Sort of difficult to figure out what went wrong since you reverted all your changes.

What is your setup? Are you in a situation where you can uninstall the module and re-install it? Or do you already have valuable data in your db?

bluesman2014’s picture

i samspinoy,

Sorry for the slow reply. I've re-installed the module and managed to get the 2.x branch to retrieve my old option set so that part is working fine again. When adding a product to cart, the options are being stored in the database (they're appearing with data in the _value column).

In the cart view however, I still can't get the selected options to appear. I've added the relationship the the commerce options and added fields for the various options (for which the data is there), but the view shows these option fields as blank.

I'm currently using:
Commerce 7.x-1.11
Product Option 7.x-2.x-dev
Product Attributes 7.x-1.0-beta3
Views 7.x-3.10

bluesman2014’s picture

My apologies, I take it back. Not sure what I did differently, but I've refreshed things a few times, and now the options are appearing just as expected.

Many thanks!

Anonymous’s picture

No problem. Note that the Product Attributes module is no longer a requirement when using the 2.x branch.

Anonymous’s picture

Status: Active » Closed (fixed)
kylahuff’s picture

I have the same issue as above, still using the 7.x-1.0-beta2

I've installed the module, and now trying to configure the view.

The view I want to configure is the admin backend order view (store > orders > view). In views its called - Line Items (commerce Line item)

When trying to add a Relationship I don't see "Commerce Order: Referenced line item"
I only have 4 options which are:

Commerce Line Item: order ID
Commerce Line item: reference line items
Commerce Line item: reference products
Commerce Line item: bundled products

By using Commerce Line item: reference products I can then add my field to the view but when viewing it appears blank and doesn't bring in the customers selection.

I am using the following:
Product Attributes 7.x-1.0-beta3
Product Bundle 7.x-1.0-alpha6
Product Option 7.x-1.0-beta2
Product Option set Reference 7.x-1.0-beta2

Any help would be much appreciated.
Thanks

kylahuff’s picture

Status: Closed (fixed) » Needs work
kylahuff’s picture

Status: Needs work » Active
Anonymous’s picture

Status: Active » Closed (fixed)

Development for the 1.x branch has stopped.
This ticket is for the 2.x branch, which works as expected.