Hello, I have my products organized in Categories and Subcategories using Taxonomy.

The subcategory's taxonomy view display's it's products and they have as a field Commerce's 'add to cart form'.

The product is correctly placed on the cart as a line item but it's 'Display Path' field is bland and hence it does not link to it's node, whereas if it's added to the cart via it's node, it works like a charm.

I don't know if this is working as intented, but if it is I'd like some pointers on how to override it. Thanks!

Comments

magtak’s picture

same question in DSE: http://drupal.stackexchange.com/questions/21733/commerce-views-taxonomy-... in case you wanna answer there too :)

amateescu’s picture

Category: bug » support
Status: Active » Fixed

You need to check this option in the 'Add to cart form' field settings: "Link products added to the cart from this View to this View's path if displayed as a page."

magtak’s picture

Status: Fixed » Active

Wrong. That will lead to the view, not to the product. (Plus for some reason it doesn't work but that's another story).

magtak’s picture

Category: support » bug
magtak’s picture

found a possible/probable duplicate that seems still unresolved: http://drupal.org/node/1399434

rszrama’s picture

Category: bug » support
Status: Active » Fixed

The problem is the "Add to Cart form" Views field that you're using doesn't have the node context. As far as the node and the View are concerned, that View is the sole place you're displaying that Add to Cart form. What you'd really need to do is to have the actual Product Reference field from the node rendered. When that happens, Views will load the full node and its field will be rendered individually - and it's during that process that it adds the node context to the Add to Cart form for use in the display_path field.

magtak’s picture

I see. Thanks Ryan! :D

magtak’s picture

And confirming it worked! Thanks!

rszrama’s picture

Great, glad to hear it.

Status: Fixed » Closed (fixed)

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

spinsheet’s picture

Can you please explain what you mean by

What you'd really need to do is to have the actual Product Reference field from the node rendered

I am using Organic Groups and have the View og_my. I would like to put an 'Add to Cart' Link in there that will at a predetermined product to the buyers cart.

I was looking in fields trying to find a field that corresponded to what you said about the Product Reference Field but am not coming up with anything.

rszrama’s picture

Your case is quite different, especially since an OG now is not a group. In the case of this issue, the site is using a node with a product reference field to show products for sale on the front end, so my comments were pertaining to how to present those nodes in a View to preserve the product display path in the product line item created when the product was added to the cart.