facebook-for-magento2 icon indicating copy to clipboard operation
facebook-for-magento2 copied to clipboard

All Products set to "Out-of-Stock"

Open pom-pom opened this issue 4 years ago • 7 comments

We installed and configured the FB Business Extension and everything works as expected except for one issue: All products on Facebook are set to Out-ofStock.

We set the Out-of-Stock Threshold to zero and most products have stock and are available on the web store We use MSI with with two sources, could this be related to that? Is there a way to set all products to "in stock"?

Thanks a lot in advance for your help!

pom-pom avatar Sep 07 '21 12:09 pom-pom

@pom-pom which version of module you are use? Which version of Magento and MSI are used?

Bashev avatar Sep 07 '21 12:09 Bashev

@Bashev Magento ver. 2.4.2-p1


{
  "name": "facebook/facebook-for-magento2",
  "description": "Facebook Business Extension for Magento 2",
  "type": "magento2-module",
  "license": "GPL-1.0-or-later",
  "version": "1.4.2",
  "require": {
    "facebook/php-business-sdk": "9.0.3"
  },
  "repositories": [
    {
      "type": "github",
      "url": "https://github.com/facebookincubator/facebook-for-magento2"
    }
  ],
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Facebook\\BusinessExtension\\": ""
    }
  }
}

pom-pom avatar Sep 07 '21 12:09 pom-pom

Unfortunately i cannot reproduce it (magento 2.4.3).

If saleable qty is 0, products go as out of stock to FB.

Bashev avatar Sep 07 '21 14:09 Bashev

Yes but it's currently sending all products to out of stock, even if more than 0 is available… Can I provide you with more information / screenshots to help debugging?

pom-pom avatar Sep 07 '21 14:09 pom-pom

If you have dev environment can try to dump exported data var_dump($this->inventory->getAvailability()); die(); here -> vendor/facebook/facebook-for-magento2/Model/Product/Feed/Builder.php:374

And click "Save" on some product which is available and see what string will try to be sent to FB.

Bashev avatar Sep 07 '21 14:09 Bashev

Same problem here, everything works, except... all products on Facebook are Out of Stock.

raulw avatar Sep 20 '21 19:09 raulw

Quick update: I've put "-1" in Out-of-Stock Threshold and now is working (all the products are "In stock" on Facebook)

raulw avatar Sep 20 '21 19:09 raulw