Does anybody know how to implement changing of the SKU on configurable product page according to variation selection, for Magento 2.4.3?


  • magecomp.com/blog/… Sep 7, 2021 at 9:54
  • Thanks but I already tried it and it doesn't work. I suppose it's for an older version of Magento and I can't figure out how to adapt it for 2.4
    – mephala
    Sep 8, 2021 at 7:34

2 Answers 2


In order to display product SKU of the selected product, you can create a Plugin (Interceptor) for Magento\ConfigurableProduct\Block\Product\View\Type\Configurable::getJsonConfig() where you need to add missing SKU for each simple product.

Switching SKU when selecting an option can be implemented in vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js and vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js depending on the type of attribute.

I made free VCT Change SKU Dynamically module that solve this problem.

  • 1
    Hi. Thanks. This is what I did and it worked.
    – mephala
    Dec 3, 2021 at 14:17

For shops, which are using a Hyvä Theme, our module might be an option:


This updates not only the SKU, but also the following attributes quick and easy:

  • Product Name
  • Short Description
  • Description
  • “More Information” Block
  • Related Products (performantly via AJAX)
  • Upsell Products (performantly via AJAX)

You only need to enter the fitting identifiers of your Hyvä theme in the system configuration, and the module will do the rest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.