facebookarchive / facebook-for-magento2

* Pixel on all pages, which trigger events link, PageView, ViewContent, AddToCart, Initiatecheckout and Purchase.* In the background, Syncs the products from the merchants product catalog to Facebook Catalog.* Stores all the data, like pixel id, catalog id, business maanger id, on to the local database on the instance.
Other
46 stars 36 forks source link

All Products set to "Out-of-Stock" #79

Open pom-pom opened 3 years ago

pom-pom commented 3 years ago

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!

Bashev commented 3 years ago

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

pom-pom commented 3 years ago

@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\\": ""
    }
  }
}
Bashev commented 3 years ago

Unfortunately i cannot reproduce it (magento 2.4.3).

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

pom-pom commented 3 years ago

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?

Bashev commented 3 years ago

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.

raulw commented 3 years ago

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

raulw commented 3 years ago

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