1

What is the difference between isSalable() and isAvailable() ? Are these functions differ for each product types? Any clarification will be appreciated. Thanks in advanced.

1 Answer 1

4

isAvailable() only exists on products:

/app/code/core/Mage/Catalog/Model/Product.php:1259
\Mage_Catalog_Model_Product::isAvailable
public function isAvailable()
{
    return $this->getTypeInstance(true)->isSalable($this);
}

isSalable exists on product types and checks a lot of things.

  • Product need to be enabled to be salable

  • Configurables and bundles need to have at least one salable simple product.

  • Downloadables need to have at least one link.

0

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.