New product creating configurable product
step 1: Select Attributes - selected color then, Step 2: Attribute Values - selected 2 colors then. Step 3: Selected Skip image uploading at this time Step 4: Summary - SKUis undefined-attribute value (undefined-grey) after generating product, grid format below can check product name is undefined-grey also SKU
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.
It may help you.
Problem Solved? Please click on 'Kudos' & Accept as Solution!
@Bhanu Periwal Thanks for your reply
I am getting this on edit configurations selected some more attributes
product name get undefined (undefined+attribute)
can you please check this link -
Hi @akshaykamba454 ,
Can you please confirm, did you have any customization on the SKU or name field of the product (disabling the field so that admin will not be able the change the value). If yes, can you please try disabling those customizations because Vanilla Magento doesn't have this issue.
Hope this helps you!
Problem SOlved! Click Kudos & Accept as Solution!
@Nishu Jindal thanks for reply
Configuration products on creating new it gets SKU - name + attributes correctly
but edit configuration when selected more attributes on step 4 summary SKU show undefined+ attributes (undefined + grey )
how can we get parent name from child product id or parent name from parent id from in summary.js
I have this issue on Magento2.3.5 using both imported data and a completely blank database with no edits to the SKU attribute. It happens on ALL configurations, all the time.