I'm new to Magento 2, and understand this is a change from Magento 1.

Example: I have a T-Shirt as a configurable product with colour options as Simple Products. These Simple Products all require the same price.

  • If I want to update the price of the configurable product (and thus the Simple Product variations) how do I easily do this?
  • Same question with regards to applying a special price
  • How would I apply tiered pricing to all Simple Product variants?

As far as I can see, this is only possible via the product catalogue screen: find a way to select all the Simple Product variations of that configurable product then apply a bulk action to change the price / special price. This seems very long-winded and tricky - say I had 50 variations on a product all with different SKUs: even filtering then selecting all of those in the Product Catalogue would be a task.

Therefore, I'm assuming I'm missing something! I'd guess a huge portion (majority?) of users who create configurable products will want to apply a single price to all variations (Simple Products). Simple Products should have the option of inheriting the price from their configurable product.

I believe Magento 1 handled this differently and did use the configurable product's price until explicitly overridden via a Simple Product variation. This seems far more sensible to me... though happy to be educated here!

3 Answers 3


I was getting same issue when Migrated data from Magento to Magento 2.As Magento 2 change scenario to set the Special price for configurable product and we need to require set special price for every associated product of configurable product.

ini_set('display_errors', 1);

use Magento\Framework\App\Bootstrap;


    require __DIR__ . '/app/bootstrap.php';

    $params = $_SERVER;
    $bootstrap = Bootstrap::create(BP, $params);
    $obj = $bootstrap->getObjectManager();
    $obj->get('Magento\Framework\Registry')->register('isSecureArea', true);
    $appState = $obj->get('\Magento\Framework\App\State');

    $products = $obj->create('\Magento\Catalog\Model\Product')->getCollection();
        ->addFieldToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
        ->addFieldToFilter('status', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)

    echo "Total products count: " . $products->count() . "<hr>";
    echo "<pre>";
    if ($products->getSize() > 0) {
        foreach ($products as $product) {

            $configSpecial = $product->getSpecialPrice();

            if($configSpecial > 0)
                echo 'product id<br/>'.$product_id = $product->getId();
                $configProduct = $obj->create('Magento\Catalog\Model\Product')->load($product_id);
                $_children = $configProduct->getTypeInstance()->getUsedProducts($configProduct);

                 foreach ($_children as $child){

                     $childProductId = $child->getID();

                     $childproduct = $obj->create('Magento\Catalog\Model\Product')->load($childProductId);

                     //echo $childproduct->getSpecialPrice(); 

                //echo "count: ".count($_children);



} catch (Exception $e) {
    echo $e->getMessage();

I hope this script will help you.

  • Can you clarify how/where do you put this code in order to execute it?
    – Olivier
    Nov 1, 2019 at 15:29
  • @Olivier,I have run this from root of Magento.Please check proper with test product then use it.
    – akgola
    Nov 4, 2019 at 10:14
  • I have tried you solution and worked. I change $childproduct->setStoreId(9); with $childproduct->setStoreId(0); to change the special price to all stores. Only one problem. The special price change only to products with quantity > 0. If the quantity is 0 no special price field updated.
    – panosdotk
    Feb 18, 2021 at 11:04

I've found a ticket for the tiered pricing element of this question on the M2 feature request platform:


It's been hanging around for 6 months now (as of 21/03/17) so if you're suffering from this please check the ticket and up-vote!


You can do this when create new product

  • Create simple product

  • Setup price/special price/tier price for it

  • Create configuration for this simple product (it will become configurable product)

Note: you can't edit configurable product price later

  • Hi MageX, thanks for the post. This is the crux of my question though: the easy updating of prices (regular, special and tiered pricing) is a critical business activity and is either difficult or impossible to do efficiently, as far as I can see.
    – Tom Bates
    Mar 21, 2017 at 11:09

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.