Use SKU token with pathauto

Created on 6 December 2022, about 2 years ago
Updated 9 November 2024, about 1 month ago

Describe your bug or feature request.

I would like to use the SKU in the pathauto patterns for my products in order to automatically generate paths like this: '/products/MYSKU'

I can't find the right token within the list of available tokens to pathauto.

If a bug, provide steps to reproduce it from a clean install.

  1. Intall commerce
  2. Install pathauto
  3. Configure product types and variations
  4. Create some products
  5. Make sure your products have a field called SKU
  6. Populate the site with some new products
  7. Go to /admin/config/search/path/patterns
  8. Try creating a pattern and look for a token of the SKU field

You'll see that no token exist for the SKU field.

If you visit /admin/help/token you will find the following token:

[commerce_product_variation:sku:value]

However; if you try to use this token into the pathauto pattern, you wil get an error indicating that this token isn't available.

🐛 Bug report
Status

Active

Version

2.32

Component

Product

Created by

🇺🇸United States jcmartinez Raleigh, NC, USA

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy alicacwb

    Hi, did you solve this problem?

  • 🇮🇱Israel jsacksick

    This sounds like a support request to me, which aren't answered from this queue. Given that this refers to a non standard field (SKU field added to products and not variations), closing this as this isn't a Commerce core bug per say.

Production build 0.71.5 2024