Hi, I hope this is the correct place for my issue...
To create a product listing and add fields from the product variation (such as Add to cart), I followed Randy Fay's tutorial and added a relationship to "Content: Referenced products". After clicking Apply, the views UI shows it as "Content: Version" instead of "Content: Product variations" (or "Content: Product" as is listed in Randy's video) and only lets me reference version related fields to the view (See attached screen shots).
The SQL is correct though! (I have a Kickstart sandbox and compared the code):
SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language
FROM
{node} node
LEFT JOIN {field_data_field_product_variations} field_data_field_product_variations ON node.nid = field_data_field_product_variations.entity_id AND (field_data_field_product_variations.entity_type = 'node' AND field_data_field_product_variations.deleted = '0')
INNER JOIN {commerce_product} commerce_product_field_data_field_product_variations ON field_data_field_product_variations.field_product_variations_product_id = commerce_product_field_data_field_product_variations.product_id
WHERE (( (node.status = '1') AND (node.type IN ('product_display_media')) ))
ORDER BY node_title DESC
LIMIT 20 OFFSET 0
I tested it in a different sandbox environment (a duplicated VM of my current production site) and updated Views 3 to 7.xdev The problem got stranger... While it shows the proper description in the UI, I can only add the variation as a whole, not each field by itself.
I'm fresh out of ideas.
(of course tried to clear cache, run an update and even rebooted the server)
Thanks in advance! Philip
PS: Drupal 7 server and all modules are updated. I can't use Kickstart, as I am adding the shop to an existing site.
Comment | File | Size | Author |
---|---|---|---|
AddRelationship1.jpg | 52.64 KB | philipkriener | |
AddRelationship2.jpg | 52.99 KB | philipkriener | |
AddRelationship3.jpg | 24.08 KB | philipkriener | |
AddRelationship4.jpg | 44.65 KB | philipkriener |
Comments
Comment #1
philipkriener CreditAttribution: philipkriener commentedComment #2
philipkriener CreditAttribution: philipkriener commentedIt's been a week... nobody? help please!
Comment #3
philipkriener CreditAttribution: philipkriener commentedApparently the activated views cache was the culprit.
/admin/structure/views/settings/advanced