Closed (works as designed)
Project:
Commerce Core
Version:
7.x-1.0-rc3
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2011 at 18:59 UTC
Updated:
30 Oct 2011 at 21:40 UTC
Hi,
i have successfully created a view of products. The only problem is with the Product image field.
I want the Product image to link to the full product node.
Therefore i set the Image field to "Link to Content" (view settings).
However the link of the image points to "/admin/commerce/products/2" instead of "/node/3".
Is this a bug?
Comments
Comment #1
rszrama commentedIt's actually the expected (if unfortunate) behavior. The way around it is for your View to be based on Content, not Commerce Products. Remember, because product definitions are separated from product displays, there's no way for Drupal to know that any given product field ought to be mapped to just one particular node. We work around this in product displays when we display product fields in the context of other entities (like product display nodes) by including the current node ID in the field data and altering the output of image fields so that "Link to content" actually will link to the node in which a product is being displayed.