Try our conversational search powered by Generative AI!

Removing the variant's query parameter from the URL and just keeping the color



How can we achieve the result below, when we actually have the following URL structure:

Actual URL Structure (includes the variation code) Ideal URL Structure (Includes only the color name, the size is not needed in the URL)
Master Product 221317
  - Pink (3847) S
  - Pink (3847)  M
  - Pink (3847)  L
  - Taupe (8012) S
  - Taupe (8012) M
  - Taupe (8012) L

We are using Commerce 13.3


Dec 01, 2021 16:44

I suppose you can change your ProductController's Index action

public ActionResult Index(FashionProduct currentContent, string color = "")

of course in there you need to handle sizes, but the url generated should be that 

Dec 08, 2021 6:36

Thank you Quan!

Dec 10, 2021 14:53
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.