Add product variation canonical URL as variable in commerce-product-variation.html.twig

Created on 17 March 2023, about 2 years ago

Describe your bug or feature request.

When rendering a product variation it is possible to link to the product canonical URL. However, if the current variation is not the default one, the user will have to deal with attributes selector to get the desired variation.

It's not possible to retrieve this URL directly from the twig template because product_variation_entity.toUrl() is not an allowed method

Would be great to provide also the product variation specific URL, so will be possible to link to the specific variation or the generic product depending on the user needs.

Feature request
Status

Active

Version

2.0

Component

Product

Created by

🇪🇸Spain plopesc Valladolid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024