cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

SOLVED

Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

I have created a configurable product. This product has an attribute for the color of the product, I have selected a different SKU for each color. But when I enter my website, and see my product, if I change the color, the SKU of the product does not change, why does this happen? Should not I change the SKU as I change the product photo when I click on each color?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hello @ManuelSissl 

 

Its default behavior of the Magento.

 

Coming to the point - those single product SKUs are mainly used for backend purpose.

 

If you look at the placed order - let's say you select any color and size from the configurable product and placed the order and then on the backend if you check under the line-items section then it will showing that specific SKU (single product sku) only.

 

But on the customer point of view if we showcase different sku for same product based on the color and size then they might get confused (Just my thoughts) so may be due to that default its not showing !

 

You can try extensions there are few extensions available which showing sku name for configurations option as well

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

8 REPLIES 8

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hi,

 

By default Mageno doesn't do that. That is why I installed this extension for this. It switches SKU and lots more.

 

https://www.best4mage.com/configurable-products-simple-details-magento-2.html

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hello @ManuelSissl 

 

Its default behavior of the Magento.

 

Coming to the point - those single product SKUs are mainly used for backend purpose.

 

If you look at the placed order - let's say you select any color and size from the configurable product and placed the order and then on the backend if you check under the line-items section then it will showing that specific SKU (single product sku) only.

 

But on the customer point of view if we showcase different sku for same product based on the color and size then they might get confused (Just my thoughts) so may be due to that default its not showing !

 

You can try extensions there are few extensions available which showing sku name for configurations option as well

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hello @ManuelSissl ,

 

ts default behavior of the Magento. but We can achieve it by coding.

I hope that you have basic knowledge of Magento.

 

  • Write a Plugin for Magento\ConfigurableProduct\Block\Product\View\Type\Configurable::getJsonConfig() and add the SKUs to the result:
    $config['skus'] = [];
    foreach ($subject->getAllowProducts() as $simpleProduct) {
    $config['skus'][$simpleProduct->getId()] = $simpleProduct->getSku();
    }
  • Extend Product.Config from app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/configurable.js using RequireJS. A good place to add the code to change the displayed SKU is reloadPrice(). You will have access to the SKUs via this.config.skus

 


--
If my answer is useful, please Accept as Solution & give Kudos

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hi all,

Please have a look at our new Configurable Products extension for Magento 2. It has a lot of features that will help you showing configurable products with the details of the associated simple products. Or make Simple Products available in search and when chosen redirect them to the configurable with preselection of the simple product.

 

The extension is regularly updated with new features like showing simple prices and tier prices on the listing page or mass update for tier prices (coming soon). See here for all the features: https://www.best4mage.com/configurable-products-simple-details-magento-2.html

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hi, this extension works for Enterprise edition 2.3.1?

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Even though its default behavior I don't think it should be. I think the vast majority of people would expect the sku to change with a configurable product....

 

This is something that keeps surprising me that the developers haven't made standard yet.

 

 

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

Hello AndyAJ,

I would like to ask the next dynamic SKU this has found a solution?

 

Re: Magento 2.3.0 - Why does SKU not change dynamically in configurable product?

hello @gelanivishal ,I'd like to ask what changes should be made in reload price. Please give me some examples. I'm Xiaobai. I need your help. Thank you