Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2012 at 06:43 UTC
Updated:
15 May 2012 at 05:20 UTC
Hi,
suppose I'm using views to display product (not using display node)
1. I create product listing view page, supplying product link with: /product/[product-title]
example: /product/shirt5
2. I create individual product view page , with path: /product/%
accepting argument: product ID
How the product view page know the product ID , since the link I supply in the listing is [product-title]?
or how to transform product title argument to product ID ?
thanks
Comments
Comment #1
josephsergio commentedI am having a similar issue - I want to have a different view on seperate product pages (for examples) Tshirts / Vnecks / Tanks
How would I go about this?
Comment #2
rszrama commentedTo determine the product to display from the URL, you have to use what Views 3 calls a "Contextual Filter" (was an "Argument" in Views 2 and prior). The problem is that for products, the only argument Drupal Commerce provides at the moment is by Product ID. You actually can't use Product titles, because they're not unique, but an argument could be written that works based on Product SKUs, which could still contain search engine friendly terms.
Here's an example View that will get you part of the way there: