0

Hope you can help me. I could not find a specific thread regarding this issue.

I have a question regarding stock alerts in Magento 2.3.2. I have a multistore (with shop 1 through 5). They are basically translations.

The problem: When a product is in stock again Magento should send out stock alerts. It does so, but only for store 1, but not store 2/5.

I have checked the settings in Configuration > Catalog > Catalog. For every scope of the multistore Allow Alert When Product Comes Back in Stock is enabled.

I am kinda at a loss on how to proceed next. Is it a know Magento 2.3.2. bug or are there areas I haven't looked yet?

Thank you in advance for your help.

0

I am also facing this same issue, I have fixed this with following Code. By creating new module.

Step1: Please Create new Module then enable it.

Step2: Now add 2 files 1st is di.xml and 2nd is AddinventoryDataObserverOSC.php

Put the code in di.xml

Path: app\code\Oscprofessionals\OrderOos\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\CatalogInventory\Observer\AddInventoryDataObserver" type="Oscprofessionals\OrderOos\Observer\AddInventoryDataObserverOsc" />
</config>

Put the code in AddinventoryDataObserverOSC.php

Path: app\code\Oscprofessionals\OrderOos\Observer\AddInventoryDataObserverOsc.php

<?php
/*
* @author      Oscprofessionals Team (support@oscprofessionals.com)
* @copyright   Copyright (c) 2019 Oscprofessionals (http://www.oscprofessionals.com)
* @category    Oscprofessionals
* @package     Oscprofessionals_OrderOos
*/
namespace Oscprofessionals\OrderOos\Observer;

use Magento\CatalogInventory\Observer\AddInventoryDataObserver as AddInventoryDataObserver;
use Magento\Framework\Event\Observer as EventObserver;

class AddInventoryDataObserverOSC extends AddInventoryDataObserver
{
    public function execute(EventObserver $observer)
    {
        $product = $observer->getEvent()->getProduct();
        if ($product instanceof \Magento\Catalog\Model\Product) {
            //$this->stockHelper->assignStatusToProduct($product);
        }
    }
}

Hope this will help you!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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