Closed (fixed)
Project:
Commerce Product Option
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2011 at 05:27 UTC
Updated:
4 May 2015 at 09:38 UTC
Jump to comment: Most recent
Comments
Comment #1
hunziker commentedWe 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.
Comment #2
giorgoskI 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
Comment #3
hunziker commentedAs I wrote you need to edit your cart view. Use the "Attribute Field" of the line item entity.
Comment #4
miiimoooSorry this may be obvious but do you have any idea why it (product attributes) isn't available in the Orders view?
Comment #5
olafkarsten commentedMiiimoo - 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.
Comment #6
miiimoooHey 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.
Comment #8
aminalid commentedIn 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.
Comment #9
bendev commentedSee the patch I proposed here to remove the price
https://drupal.org/node/1322632
Comment #10
Rosamunda commentedI 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!
Comment #11
1kenthomas commentedSame 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.
Comment #12
bluesman2014 commentedI 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.
Comment #13
Anonymous (not verified) commented@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.
Comment #14
bluesman2014 commentedHi @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).
Comment #15
Anonymous (not verified) commentedSort 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?
Comment #16
bluesman2014 commentedi 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
Comment #17
bluesman2014 commentedMy 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!
Comment #18
Anonymous (not verified) commentedNo problem. Note that the Product Attributes module is no longer a requirement when using the 2.x branch.
Comment #19
Anonymous (not verified) commentedComment #20
kylahuff commentedI 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
Comment #21
kylahuff commentedComment #22
kylahuff commentedComment #23
Anonymous (not verified) commentedDevelopment for the 1.x branch has stopped.
This ticket is for the 2.x branch, which works as expected.