cancel
Showing results for 
Search instead for 
Did you mean: 

Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

After setting up Multi Source Inventory (MSI) and moving inventories to multiple sources, I noticed that my configurable products display "As low as $0.00" before any options are chosen on the storefront.  Also, if I happen to have the "Manufacturer's Suggested Retail Price" set under advanced pricing, which is the same as the selling price, it is stating "To see product price, add this item to your cart. You can always remove it later."  If I select an option, it still states that, even though it displays the price without being crossed out.

 

Simple products do not appear to have any issue. Yet.

 

How to I get it to display the pricing appropriately?

 

7 REPLIES 7

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

So... I went back to a snapshot before MSI was installed because it was a total mess after everything I tried... 

I then re-enabled the MSI modules and began setting up my "Stock" and multiple sources.  The "Default Source" was automatically assigned to all my inventory upon enabling MSI.  As soon as I set the quantity to 0 for that default source on all items in a Configurable Product and assign the inventory to other sources, that is when it states "As low as $0.00" on the product on the store front.

 

If I change any one of the items in the configurable product  to make the "Default Source" have a quantity greater than 0, then it displays the price appropriately stating "As low as $xxx.xx", with xxx.xx being the actual price of the lowest priced item.

 

This seems like a bug.  The source for the inventory should not matter, and it should never state a $0.00 amount if none of the products are listed as that.

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

I just faced similar problem in 2.3.2 version and I think i found a potential bug in a code. When estimating lowest price for configurable product, its options are being checked. But if the options are out of stock, they are not being processed at all. Even if you choose in config to display out of stock products.

 

This is the piece of code that causes this 

class:

Magento\ConfigurableProduct\Model\ResourceModel\Product\StockStatusBaseSelectProcessor

method:

 

public function process(Select $select)
    {
        if ($this->stockConfig->isShowOutOfStock()) {
            $select->joinInner(
                ['stock' => $this->stockStatusResource->getMainTable()],
                sprintf(
                    'stock.product_id = %s.entity_id',
                    BaseSelectProcessorInterface::PRODUCT_TABLE_ALIAS
                ),
                []
            )->where(
                'stock.stock_status = ?',
                StockStatus::STATUS_IN_STOCK
            );
        }

        return $select;
    }

 

It checks if isShowOutOfStock is true, and then adds STATUS_IN_STOCK to where clause anyway. This just doesn't make any sense to me. If you add '!' to the if statement, prices are displayed correctly. Like that:

 

public function process(Select $select)
    {
        if (!$this->stockConfig->isShowOutOfStock()) {
            $select->joinInner(
                ['stock' => $this->stockStatusResource->getMainTable()],
                sprintf(
                    'stock.product_id = %s.entity_id',
                    BaseSelectProcessorInterface::PRODUCT_TABLE_ALIAS
                ),
                []
            )->where(
                'stock.stock_status = ?',
                StockStatus::STATUS_IN_STOCK
            );
        }

        return $select;
    }

Can anyone of development team verify this?

 

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

Thanks for your reply, and I am going to look into your findings, but I did find out what was causing the problem in my case....  It is the Amasty "Custom Stock Status for Magento 2 Community" extension (amasty/stockstatus) causing the issue.

 

For some absurd reason, Magento decided not to show out of stock configurable items in a configurable product, even when the "Display Out of Stock Products" option is set to yes.  So, I bought the Amasty Custom Stock Status extension to do it.  The extension will display the out of stock configurable item, but only if the "Display Out of Stock Products" option is also set to yes.  It did what I needed it to do.

 

The problem, stated in my original post, came when I enabled the Multi-Source Inventory (MSI) modules.  I started suspecting it might be related to the extension, but since I had already had to go to a snapshot once for messing up my system, I created a new cloud server instance for troubleshooting the issue.

 

Sure enough, if I have MSI enabled, create a different Inventory Stock (Sales Channel) and make that the sales channel for my site instead of "Default Stock", assign inventory sources (other than "Default Source" to that stock, and assign only those sources to the configurable product items, that is when I see the issue:

 

StockStatus_MSI_Issue-ConfigProduct0Amount.jpg

 

StockStatus_MSI_Issue-ConfigProductDefaultSourceNotAssigned.jpg

And here is an image showing the result when the "Enable MAP" option is set to yes and a "Manufacturer's Suggested Retail Price" is set to the same value as the product price:

 

StockStatus_MSI_Issue-ConfigProduct_MAP_MSRP_Set.jpg

 

If the MSRP is the same as the selling price, then the message to add to the cart to see the price should not be shown.

 

If I disable the Amasty Custom Stock Status module, the out of stock item disappears from the configurable product dropdown (as expected, unfortunately), but the prices are reflected correctly:

StockStatus_MSI_Issue-ExtensionDisabledConfigProductAmountCorrect.jpg

This is definitely a bug with the Amasty Custom Stock Status not working correctly with Multi-Source Inventory.  I am going to contact Amasty to see if they will fix it.  Will update this thread with their response.

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

So I worked with Amasty on this issue and they were able to recreate the issue without having the Amasty extension installed at all.  So, I went to a snapshot on my test server at the point that I had a fresh install of Magento 2.3.2, and did not have the Amasty Custom Stock Status extension installed, and I was able to recreate the issue as well.

 

It turns out, if you have the Multi-Source Inventory setup to not use the "Default Stock" or the "Default Source" at all, and set "Display Out of Stock Products" to "Yes" under Stores > Configuration > Catalog > Inventory > [Stock Options], it will display $0.00 for the configurable product price.

 

In my case I used a new stock/channel called "US Stock" and 2 sources called "Main Source" and "Dropship Source".  I did not assign the Default Source or Default Stock to anything. 

 

I have the prices of the three items for my configurable product set to Red $190.00, Green $195.0, and Blue $200.00.  I have 0 in stock set for the 1st item and >1 set for the other 2.

 

If I set "Display Out of Stock Products" to "Yes", the Price shows "As low as $0.00", and the choices it gives me is "Green +$195.00" and "Blue +200.00".

 

If "Display Out of Stock Products" is set to "No", it displays "As low as $195.00".  and the choices it gives me is "Green" and "Blue +5.00", which is expected.  With Amasty Custom Stock Status extension installed, it also shows the Red item as "Out of Stock".

 

If I assign the "Default Source" to one of the items in the configurable product and give it a quantity greater than zero, then it shows the price correctly as well... But this just isn't the way it should be done...

 

So, I will post a Bug to the Magento Github site when I get a chance.

 

 

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

I created an "Issue" report on the Magento/Inventory github website:

 

Configurable Product with Non-Default MSI Stock/Source displays $0.00 if "Display Out of Stock Products" set. #2543

https://github.com/magento/inventory/issues/2543

 

I see a lot of issues on that site that haven't even been touched and been there for a long time, so I am not sure if this will be looked into any time soon.

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

We were facing the same issue after importing a load of products and their product relations.

 

There appear to be two tables doing the same function. One has the parent as 1st col and child as 2nd column.

 

Catalog_product_relation is either empty or does not have all of the data in

 

You can use the catalog_product_super_link table to refill the data correctly in Catalog_product_relation;

 

INSERT IGNORE INTO `/*PREFIX*/catalog_product_relation` (`parent_id`, `child_id`)
SELECT `parent_id`,`product_id` as 'child_id' 
FROM `/*PREFIX*/catalog_product_super_link`

Let us know if this works for you

Chris @ Rixxo
Magento Solution Specialist, 10 year Magento user, store owner and Agency Director

Re: Default Configurable Product Pricing states $0.00 after setting up Multi Source Inventory (MSI)

Thank you for the solution. It was the cause in our case.