0

I have set Allow Alert When Product Comes Back in Stock = Yes.

The link to 'suscribe to stock alerts' is being shown in simple products which have no stock. Nice.

The link to suscribe to stock alerts is never shown in configurable products.

Just for testing purposes I have removed $this->_product->isAvailable() check in function prepareStockAlertData() in ProductAlert/Block/Product/View.php,

From:

public function prepareStockAlertData()
    {
        if (!$this->_getHelper()->isStockAlertAllowed() || !$this->_product || $this->_product->isAvailable()) {
            $this->setTemplate('');
            return;
        }
        $this->setSignupUrl($this->_getHelper()->getSaveUrl('stock'));
    }

To:

public function prepareStockAlertData()
    {
        if (!$this->_getHelper()->isStockAlertAllowed() || !$this->_product) {
            $this->setTemplate('');
            return;
        }
        $this->setSignupUrl($this->_getHelper()->getSaveUrl('stock'));
    }

Then the link to suscribe to stock alerts is shown in configurable products.

Why is isAvailable() returning true if all of the simple products associated to the configurable product have no stock?

I have also tried to change the configurable product Stock options, Manage Inventory (yes/no) and availability (yes/no). Nothing seems to change.

Any ideas?

(I am using Magento 1.9)

0

Ok, I found out this is being caused by a custom extension (EasyLife Switcher). Disabling the extension does solve the issue.

More information available here: https://github.com/tzyganu/Switcher/issues/136

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.