Add a "copy link" operation to the variations list

Created on 30 April 2024, about 2 months ago
Updated 25 June 2024, 4 days ago

Commerce Core supports deep linking to product variations by appending a variation ID query parameter to a PDP URL. The Add to Cart form adds and updates this parameter as options are changed on the Add to Cart form, such that if I configure a product and copy the link to send to someone, they will see my same selection:

example.com/some-cool-product?v=42

The only way for an admin right now to get such a link is to do so from the PDP even though we list the variations out in the product edit interface. I think we should add a link copying operation there as a convenience feature, the method based on the ease of either strategy:

  • Add a "Copy link" operations link to the dropbutton that would copy the variation specific link to the clipboard when selected. If we can do that without needing any sort of interstitial page, this is a fine option; I just wasn't sure what amount of flexibility we had here.
  • Add a copy icon to the right of the dropbutton similar to what you see on GitHub and elsewhere for copying links to repositories with a hover text that explains, "Copy variation link to clipboard".
✨ Feature request
Status

Fixed

Version

2.0

Component

User experience

Created by

🇺🇸United States rszrama

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024