Git Product home page Git Product logo

facebookarchive / facebook-for-magento2 Goto Github PK

View Code? Open in Web Editor NEW
45.0 42.0 36.0 446 KB

* 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.

License: Other

PHP 24.73% HTML 1.47% CSS 0.96% JavaScript 72.75% Shell 0.08%

facebook-for-magento2's Introduction

Facebook Business Extension For Magento2

⚠️ NOTE: This version is deprecated and archived. Check out Meta's new extension on Magento Marketplace. To contribute or report issues, visit https://github.com/magento/meta-for-magento2.

Facebook Connects Businesses with People

Marketing on Facebook helps your business build lasting relationships with people, find new customers and increase sales for your online store. With this Facebook ad extension, we make it easy to reach the people who matter to your business and track the results of your advertising across devices. This extension will help you:

Reach the right people

Set up the Meta pixel to find new customers, optimize your ads for people likely to buy and reach people with relevant ads on Facebook after they've visited your website.

Show them the right products

Connect your product catalog to Facebook to use dynamic ads. Reach shoppers when they're on Facebook with ads for the products they viewed on your website.

Measure the results of your ads

When you have the Meta pixel set up, you can use Facebook ads reporting to understand the sales and revenue that resulted from your ads. Many online retailers have found success using the Meta pixel to track the performance of their ads and run dynamic ads:

“The ability to measure sales was the first sign that our business would be a success. Our first day of breaking 100-plus sales always sticks out. Point blank, our marketing plan is Facebook, Facebook, and more Facebook... Facebook is 100% the backbone of our customer acquisition efforts and it's been made even better with the improved Facebook pixel” — Ali Najafian, co-founder, Trendy Butler

“I'm thrilled with the results we've seen since launching dynamic ads. We saw a rise in conversions almost immediately after launch and have been able to scale the program at an impressive pace over the past 6 months. These ads have proven to be a key component of our marketing efforts” — Megan Lang, Digital Marketing Manager, Food52

“With dynamic ads, Target has been able to easily engage consumers with highly relevant creative. The early results have exceeded expectations. Performance has been especially strong on mobile devices — an important and fast-growing area for Target — where we're seeing two times the conversion rate” — Kristi Argyilan, Senior Vice President, Media and Guest Engagement at Target

What's included?

(a) Pixel installer

Installing the Meta pixel allows you to access the features below:

Conversion tracking: See how successful your ad is by seeing what happened as a direct result of your ad (including conversions and sales)

Optimization: Show your ads to people most likely to take a specific action after clicking on them, like adding an item to their cart or making a purchase

Remarketing: When people visit your website, reach them again and remind them of your business with a Facebook ad

(b) Product catalog integration

Importing your product catalog to Facebook allows you to use dynamic ads. Dynamic ads look identical to other link ads or carousel-format ads that are available on Facebook. However, instead of individually creating an ad for each of your products, Facebook creates the ads for you and personalizes them for each of your customers.

Scale: Use dynamic ads to promote all your products without needing to create individual ads for each item

Highly relevant: Show people ads for products they're interested in to increase the likelihood of a purchase

Always-on: Set up your campaigns once and continually reach people with the right product at the right time

Cross-device: Reach people with ads on any device they use, regardless of where they first see your products

Usage Instructions

Facebook Business Extension - Installation steps

INSTALL FACEBOOK BUSINESS EXTENSION FROM ZIP FILE ON YOUR DEV INSTANCE. TEST THAT THE EXTENSION WAS INSTALLED CORRECTLY BEFORE SHIPPING THE CODE TO PRODUCTION

Before installing, verify your Magento cron job is up and running, read more about it on this page.

Login to your server instance.

INSTALLATION

Magento Marketplace Installation

You can download and install our extension in Magento marketplace if you have a marketplace account.

Composer Installation

  • Go to your magento root path
  • Execute command cd /var/www/Magento or cd /var/www/html/Magento based on your server Centos or Ubuntu.
  • run composer command: composer require facebook/facebook-for-magento2
  • To enable module execute php bin/magento module:enable Facebook_BusinessExtension
  • Execute php bin/magento setup:upgrade
  • Optional php bin/magento setup:static-content:deploy
  • Execute php bin/magento setup:di:compile
  • Execute php bin/magento cache:clean
  • Execute php bin/magento cron:run three times

Manual Installation

  • extract files from an archive.
  • Execute command cd /var/www/Magento/app/code or cd /var/www/html/Magento/app/code based on your server Centos or Ubuntu.
  • Move files into Magento2 folder app/code/Facebook/BusinessExtension. If you downloaded zip file on github, you need to create directory app/code/Facebook/BusinessExtension. If you downloaded zip from facebook, those two folders are included.
ENABLE EXTENSION
  • Make sure you have correct read/write permissions on your Magento root directory. Read about them here.
  • Move to magento root folder by executing command cd ../../
Enable Extension By Running Script

You can install the extension with a bash script.

  • Copy the install-facebook-business-extension.sh script to your Magento root folder.
  • Give it execute permission with chmod +x install-facebook-business-extension.sh (you may have to log in as root user to do it).
  • Switch to Magento files owner user and run: ./install-facebook-business-extension.sh.
  • You should read Installation finished when the script is done.
Enable Extension By Running Commands Manually
  1. Execute the following commands to manually install Facebook Business Extension.
  • Install the Facebook Business SDK for PHP: composer require facebook/php-business-sdk. This dependency is used by the extension.
  • You will see a message similar to: Installing facebook/php-business-sdk (8.0.0): Downloading (100%)
  • Execute php bin/magento module:status
  • You must see Facebook_BusinessExtension in the list of disabled modules.
  • To enable module execute php bin/magento module:enable Facebook_BusinessExtension
  • Execute php bin/magento setup:upgrade
  • Optional php bin/magento setup:static-content:deploy
  • Execute php bin/magento setup:di:compile
  • Execute php bin/magento cache:clean
  • Execute php bin/magento cron:run three times

Verify Installation

  • Upon successful installation, login to your Magento Admin panel.
  • Click the Stores icon in the main menu.
  • There should be a section named Facebook -> Setup
  • Click on 'Setup' to go to the Extension Installation Page.

Testing before installing

If you want to test this extension in a separate environment, without making changes in your production server, you can use the files provided in tests folder.

Follow docker-installation-instructions.txt file to run a Magento 2 store with the extension installed, using Docker, so you can test in your local machine.

Need help?

Visit Facebook's Advertiser Help Center.

Requirements

Facebook Business Extension For Magento2 requires

  • Magento version 2.0 and above
  • PHP 7.0 or greater
  • Memory limit of 1 GB or greater (2 GB or higher is preferred)

Contributing

See the CONTRIBUTING file for how to help out.

License

Facebook Business Extension For Magento2 is Platform-licensed.

facebook-for-magento2's People

Contributors

bashev avatar bsimone avatar bst2002git avatar dabramovici avatar danbtl avatar facebook-github-bot avatar fbisaso avatar heymultiverse avatar jesalazar avatar josejia avatar jurajh-fb avatar mellenio avatar nenriquez avatar xxu3-sc avatar zlik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facebook-for-magento2's Issues

Don't re-load products if you only need the product ID

There are quite a few cases in this extension where the extension will call something similar to:

$productModel = $this->fbeHelper->getObject(\Magento\Catalog\Model\Product::class);
$product = $productModel->load($item->getProductId());
$ids[] = $product->getId();

This is icky for a few different reasons:

  • Using the Object Manager to load the product model;
  • Using the product model directly to load a product, rather than eg. ProductRepositoryInterface;
  • Loading products when it isn't necessary

A few good examples of this:
https://github.com/facebookincubator/facebook-for-magento2/blob/master/Block/Pixel/InitiateCheckout.php#L20
https://github.com/facebookincubator/facebook-for-magento2/blob/master/Block/Pixel/InitiateCheckout.php#L55

Both of these can be replaced with something like this instead:

$ids[] = $item->getProduct()->getId(); //or alternatively $item->getProductId()

As a sidenote, there are a few weird edge cases where loading a product twice may cause deserialisation on a JSON attribute twice, leading to this error:

Exception #0 (Magento\Eav\Model\Entity\Attribute\Exception): Warning: json_decode() expects parameter 1 to be string, array given in /var/www/html/vendor/magento/framework/Serialize/Serializer/Json.php on line 40
<pre>#1 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#2 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/Validator/UniversalFactory.php:36]
#3 Magento\Framework\Validator\UniversalFactory->create() called at [vendor/magento/module-eav/Model/Entity/AbstractEntity.php:691]
#4 Magento\Eav\Model\Entity\AbstractEntity->walkAttributes() called at
[ ... ]
#23 Magento\Catalog\Model\Product\Interceptor->load() called at [app/code/Facebook/BusinessExtension/Block/Pixel/InitiateCheckout.php:20]
#24 Facebook\BusinessExtension\Block\Pixel\InitiateCheckout->getContentIDs() called at [app/code/Facebook/BusinessExtension/view/frontend/templates/pixel/initiate_checkout.phtml:14]
#25 include() called at 

^ this error gets fixed if you start to replace the ->load() calls with just getting the product instance via $item->getProduct() or similar.

Not Shows Final Price

Hello,

Firstly, thank you for your effort.

I completed the setup without any problems. But there is a problem. Prices does not appear to be the final price. Special prices are OK. But there is a problem with "Catalog Price Rule". I'm using this for changing prices in category or whole store. But your module does not see the final price.

Thank you for your time,

Look at the screenshot. Final price is 509,15 but Facebook price is 599.
Screenshot_1

product have admin url link.

I downloaded this from facebook about a week ago, everything seems to be working fine except my product URL , they all seems to leading my Magento admin instead of the product. Has anyone else come across this issue and does anyone know the fix.

Thanks in advance.

Syncing does not work

Hello, I have a problem with the synchronization.
I have an around plugin for both retrievers to filter the exported products, so that only those products get into the feed, that are activated for it. So far so good, all products that are in the feed are uploaded correctly. But when a product is removed from the feed, it is not removed from the facebook catalog.
The syncing feature in the Catalog Management section in the magento 2 backend is enabled.
I tried via cron 'facebook_business_extension_category_sync_cronjob' and via backend 'Push Products' resp. 'Upload to facebook' button.

How can I achieve this? Any help is appreciated.

Edit: I removed my around plugins and tried it with the native extension, but still the same outcome. Once a product is created in the facebook catalog it stays there and is not automatically removed, when it's not in an updated feed.
This is the first time I'm working with the facebook catalog, so I'm sorry if this is just a setting in facebook?! But I went through all settings and couldn't find anything.

Deduplication parameters for events are missing

Many events are not being deduplicated correctly. In event manager it says I need to add an event-id parameter to specific events on both the current pixel and the conversions API. how can I add an event-id parameter in the code of the conversions API of the Facebook Business Extension for magento 2? Or is there an other solution?

Magento/Facebook catalog question on behalf of Citarella.com

We installed the Facebook Business Extension for Citarella.com and the setup is showing as complete on the backend: https://paste.pics/CLOY5

However, we're not seeing the catalog feed through to Facebook, even when we manually push the products: https://paste.pics/CLOYKUnder Partnership Integrations>Magento>Catalog, we still see only the "Continue Setup" button: https://paste.pics/CLP3X

I will note that we had a previous catalog data feed that we have deleted, but the products are still in our Facebook catalog. Do we need to delete these products for this sync to occur?  Or are we potentially missing another setup step?

Getting an exception after installation

Fatal error: Uncaught Error: Call to undefined method FacebookAds\Object\ServerSide\Event::setActionSource() in /var/www/html/app/code/Facebook/BusinessExtension/Helper/ServerEventFactory.php:38 Stack trace: #0 /var/www/html/app/code/Facebook/BusinessExtension/Helper/ServerEventFactory.php(167): Facebook\BusinessExtension\Helper\ServerEventFactory::newEvent('ViewCategory', '761cf8a7-9e28-4...') #1 /var/www/html/app/code/Facebook/BusinessExtension/Observer/ViewCategory.php(51): Facebook\BusinessExtension\Helper\ServerEventFactory::createEvent('ViewCategory', Array, '761cf8a7-9e28-4...') #2 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Facebook\BusinessExtension\Observer\ViewCategory->execute(Object(Magento\Framework\Event\Observer)) #3 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Facebook\BusinessExtension\Observer\ViewCategory), Object(Magento\Framework\Event\Observer)) #4 /var/www/html in /var/www/html/app/code/Facebook/BusinessExtension/Helper/ServerEventFactory.php on line 38

Message Success on Product Page times out too quickly when adding to cart.

We encountered this problem yesterday on our site. We ruled it out to this extension being the culprit. What happens is, that when a user clicks a product and goes to its details page, if they click "add to cart", the "success" message that usually appears at the bottom (for us) of the page, flickers then disappears essentially not letting the customer know that the product was added.

We also would like to note, this "flicker" does not occur anywhere else except for when we add to cart from the product details page. We would also like to point out, that if we do not run the setup to hook up our facebook page and pixel. The messages appear as they should.

Here are our steps:

  1. Install Facebook extension for Magento
  2. Run the setup for facebook in the admin, connecting our facebook page and pixel.
  3. See the frontend and try adding product to cart from product details page.

Delete The connection

I want to disconnect the Facebook connection for some reason, But I am unable to delete the connection from under stores->Facebook->setup by pressing this button "Delete Connection",
Can you please let me know the steps that I will follow to disconnect/delete the connection ?

Security: Module leaks Magento Version and Plugin Version

This module leaks the Magento version number publicly. This allows hackers/attackers to know what vulnerabilities they could try to exploit.

I recommend that ALL references/calls to the agent-version, version, and plugin-version be removed from this module for security purposes.

These are the functions that I recommend removing from the module. There are many calls to these in the various PHP classes, template files, and subsequently JS files.

## file: Helper/FBEHelper.php

    public function getMagentoVersion()

    public function getPluginVersion()

    public function getPartnerAgent()

trackServerEvent($eventId) Slow my website

Hi Team,
As I am checking, $block->trackServerEvent($eventId); this block method, is making slow my website category page product and other pages where this is called, all goes slow down, before 4-5 days all working fine, but now getting issue of slow speed due to this mentioned method, taking approx 60-70 seconds to load.
Please check the same.

Chaos FB product attributes in grid

In backend, the grid of products show all FB attributes. (columns and filter)
It's very chaos for experience !

image

image

Please set false for is_used_in_grid and is_filterable_in_grid by default.
By the way, is_visible_in_grid may also need to set false. I'm not sure this mapping for what UI.

https://github.com/facebookincubator/facebook-for-magento2/blob/c3d5942b9b91c3380c4a1c65590067e913039e5a/Setup/UpgradeData.php#L177-L179
https://github.com/facebookincubator/facebook-for-magento2/blob/c3d5942b9b91c3380c4a1c65590067e913039e5a/Setup/UpgradeData.php#L142-L144

The end, share the code snippet for manual to set those attributes

$om = \Magento\Framework\App\ObjectManager::getInstance();
$eavConfig = $om->get(Magento\Eav\Model\Config::class);
$attributeConfig = $om->get(Facebook\BusinessExtension\Model\Config\ProductAttributes::class);
$attributes = array_keys($attributeConfig->getAttributesConfig());
array_push($attributes, 'google_product_category');

foreach ($attributes as $code) {
    $attribute = $eavConfig->getAttribute(Magento\Catalog\Model\Product::ENTITY, $code);
    $attribute->setData('is_used_in_grid', '0');
    $attribute->setData('is_filterable_in_grid', '0');
    $attribute->setData('is_visible_in_grid', '0');
    $attribute->save();
}

Special price incorrect

The module syncs special prices to Facebook but the special price in Magento could be dependent on the Special price from and to dates. The module does not take these dates into account.

Screenshot 2021-04-30 at 09 25 15

Because of this, a lot of prices were incorrectly in facebook.

Setup not working

Hi

After a successful installation on Magento 2.4, If i click setup the page is blank.

any idea?

Thanks

Screen.Recording.2021-03-09.at.11.43.34.AM.mov

Uninstall

Composer remove

Visiting: Admin -> Catalog -> Products gives me the following error:

`1 exception(s):
Exception #0 (ReflectionException): Class Facebook\BusinessExtension\Model\Config\Source\Product\GoogleProductCategory does not exist

Exception #0 (ReflectionException): Class Facebook\BusinessExtension\Model\Config\Source\Product\GoogleProductCategory does not exist

#1 Magento\Framework\Code\Reader\ClassReader->getConstructor('Facebook\Busines...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Facebook\Busines...') called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Facebook\Busines...', array()) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#4 Magento\Framework\ObjectManager\ObjectManager->create('Facebook\Busines...', array()) called at [vendor/magento/framework/Validator/UniversalFactory.php:36]
#5 Magento\Framework\Validator\UniversalFactory->create('Facebook\Busines...') called at [vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php:642]
#6 Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getSource() called at [generated/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php:1181]
#7 Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getSource() called at [vendor/magento/module-catalog/Ui/Component/ColumnFactory.php:83]
#8 Magento\Catalog\Ui\Component\ColumnFactory->create(&Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor#000000006dac2edc000000006285487e#, &Magento\Framework\View\Element\UiComponent\Context#000000006dac2c6a000000006285487e#, array('label' => &Magento\Framework\Phrase#000000006dac2fe1000000006285487e#, 'dataType' => 'select', 'add_field' => true, 'visible' => true, 'filter' => 'select', '__disableTmpl' => array('label' => true), 'sortOrder' => 128)) called at [vendor/magento/module-catalog/Ui/Component/Listing/Columns.php:67]
#9 Magento\Catalog\Ui\Component\Listing\Columns->prepare() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:164]
#10 Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(&Magento\Catalog\Ui\Component\Listing\Columns#000000006dac2d2b000000006285487e#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:161]
#11 Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(&Magento\Ui\Component\Listing#000000006dac2d26000000006285487e#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:142]
#12 Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(&Magento\Framework\View\Layout\Data\Structure#000000006dac20c7000000006285487e#, 'product_listing', array('attributes' => array('group' => '', 'component' => '', 'aclResource' => '', 'visibilityCondit...' => array())), &Magento\Framework\View\Layout\Interceptor#000000006dac2012000000006285487e#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:103]
#13 Magento\Framework\View\Layout\Generator\UiComponent->process(&Magento\Framework\View\Layout\Reader\Context#000000006dac2325000000006285487e#, &Magento\Framework\View\Layout\Generator\Context#000000006dac2305000000006285487e#) called at [vendor/magento/framework/View/Layout/GeneratorPool.php:81]
#14 Magento\Framework\View\Layout\GeneratorPool->process(&Magento\Framework\View\Layout\Reader\Context#000000006dac2325000000006285487e#, &Magento\Framework\View\Layout\Generator\Context#000000006dac2305000000006285487e#) called at [vendor/magento/framework/View/Layout.php:352]
#15 Magento\Framework\View\Layout->generateElements() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:89]
#16 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#17 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#18 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#19 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:259]
#20 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:884]
#21 Magento\Framework\View\Layout->getBlock('menu') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:414]
#22 Magento\Framework\View\Layout\Interceptor->getBlock('menu') called at [vendor/magento/module-backend/Model/View/Result/Page.php:26]
#23 Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog:...') called at [generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php:24]
#24 Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Catalog:...') called at [vendor/magento/module-catalog/Controller/Adminhtml/Product/Index.php:41]
#25 Magento\Catalog\Controller\Adminhtml\Product\Index->execute() called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Index/Interceptor.php:24]
#26 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#27 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/module-backend/App/AbstractAction.php:248]
#28 Magento\Backend\App\AbstractAction->dispatch(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#29 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#30 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#31 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(&Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor#000000006dac21ed000000006285487e#, &Closure#000000006dac21ec000000006285487e#, &Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#32 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#33 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#), NULL) called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Index/Interceptor.php:39]
#34 Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/App/FrontController.php:186]
#35 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#, &Magento\Catalog\Controller\Adminhtml\Product\Index\Interceptor#000000006dac21ed000000006285487e#) called at [vendor/magento/framework/App/FrontController.php:118]
#36 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#37 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#38 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#39 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#), array(array('crankycyclops_di...', 'page_cache_from_...', 'default_store_se...', 'storeCookieValid...', 'install', 'configHash'), array('crankycyclops_di...'))) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#40 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000006dac2479000000006285487e#) called at [vendor/magento/framework/App/Http.php:116]
#41 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#42 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#43 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000006dac2467000000006285487e#) called at [index.php:39]
`

[Feature Request] Need Customizations Option in Catalog Synchronization

Hello,
Thanks for developing the beautiful extension, I've been waiting for this long. I have some feature requests that will be more useful for everyone.

1. OPTION TO MAP CONTENT ID BY SKU
I have previously installed the extension and noticed that it is being mapped Content IDs by Database ID rather by SKUs. We have offline events integration and some other integrations all of them identifying by SKUs. So it was not possible to use the much awaited extension. There's still no option to change the Content_ID field and Pixel sending wrong IDs.

2. GOOGLE AND/OR TAXONOMY MAPPING
I think a dropdown/text option in category edit page to define Google Taxonomy is very important. Single page approach can be also fine as I am currently using Amasty Feed which has an standalone page to map all local categories with Google:
image

4. OPTION TO MAP ADVANCE ATTRIBUTES
This mapping helps advertisers map their local attributes to the Facebook catalog requirement, here's how my current extension developer did it:
image

If you have no plans to develop last two features in the near future, at least the first feature is very important, otherwise people like me can't use this extension.

I think you should also give us an option to disable catalog synchronization when we may have more advanced feed extensions so we can only use the Conversion API.

Thanks

Configurable products is not importing correct at facebook catalog

Hi. I setup my store with the facebook wizard without problems. But the configurable products is not displaying correct at the facebook store, example facebook catalog:

image

Catalog at facebook store:
image

Facebook not sets the configurable product to represents all the product sets. Facebook select a product size to display at facebook store.. All another option is not displayed.

1 - How to setup this extension to import correctly my products to facebook store?
2 - There is some documentation to use this extension by the right way? for example, there is nothing here about product atributes configuration:

image

Magento 2.4.0

Page is not working 500 internal server error

There is no error in Magento logs so when we check on server logs then got his error -

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Facebook\\BusinessExtension\\Model\\System\\Config::getOutOfStockThreshold() in /var/www/vhosts/xyx/httpdocs/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder/Inventory.php:126\nStack trace:\n#0 /var/www/vhosts/xyz/httpdocs/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder.php(362): Facebook\\BusinessExtension\\Model\\Product\\Feed\\Builder\\Inventory->getAvailability()\n#1 /var/www/vhosts/xyz/httpdocs/app/code/Facebook/BusinessExtension/Model/Product/Feed/Method/BatchApi.php(69): Facebook\\BusinessExtension\\Model\\Product\\Feed\\Builder->buildProductEntry(Object(Magento\\Catalog\\Model\\Product\\Interceptor))\n#2 /var/www/vhosts/xyz/httpdocs/app/code/Facebook/BusinessExtension/Observer/ProcessProductAfterSaveEventObserver.php(57): Facebook\\BusinessExtension\\Model\\Product\\Feed\\Method\\BatchApi->buildProductRequest(Object(Magento\\Catalog\\Model\\Product\\Interceptor))\n#3 /var/www/vhosts/m...', referer: https://xyz/admin_xyz/catalog/product/edit/id/22106/key/fccd6d61dda1f3fd1da63fa8c668c2b3a84f37d2bc1a090c195f8bd2b8903a1b/

Error saving product

The module creates several fields in the product registration. But it doesn't allow you to make any changes and save. Check the error below.

Error: Call to undefined method Facebook\BusinessExtension\Model\System\Config::getOutOfStockThreshold() in /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder/Inventory.php:126 Stack trace: #0 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder.php(362): Facebook\BusinessExtension\Model\Product\Feed\Builder\Inventory->getAvailability() #1 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Method/BatchApi.php(69): Facebook\BusinessExtension\Model\Product\Feed\Builder->buildProductEntry() #2 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Observer/ProcessProductAfterSaveEventObserver.php(57): Facebook\BusinessExtension\Model\Product\Feed\Method\BatchApi->buildProductRequest() #3 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Facebook\BusinessExtension\Observer\ProcessProductAfterSaveEventObserver->execute() #4 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #5 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #6 /var/www/html/magento2/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch() #7 /var/www/html/magento2/vendor/magento/framework/Model/AbstractModel.php(829): Magento\Framework\Event\Manager\Proxy->dispatch() #8 /var/www/html/magento2/vendor/magento/module-catalog/Model/Product.php(974): Magento\Framework\Model\AbstractModel->afterSave() #9 /var/www/html/magento2/generated/code/Magento/Catalog/Model/Product/Interceptor.php(349): Magento\Catalog\Model\Product->afterSave() #10 /var/www/html/magento2/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Product\Interceptor->afterSave() #11 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute() #12 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #13 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #14 /var/www/html/magento2/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch() #15 /var/www/html/magento2/vendor/magento/framework/EntityManager/EventManager.php(51): Magento\Framework\Event\Manager\Proxy->dispatch() #16 /var/www/html/magento2/vendor/magento/framework/EntityManager/Operation/Update.php(110): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent() #17 /var/www/html/magento2/vendor/magento/framework/EntityManager/EntityManager.php(96): Magento\Framework\EntityManager\Operation\Update->execute() #18 /var/www/html/magento2/vendor/magento/module-catalog/Model/ResourceModel/Product.php(758): Magento\Framework\EntityManager\EntityManager->save() #19 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\ResourceModel\Product->save() #20 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callParent() #21 /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(58): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #22 /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(28): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->addCommitCallback() #23 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->aroundSave() #24 /var/www/html/magento2/vendor/magento/framework/App/Cache/FlushCacheByTags.php(69): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #25 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave() #26 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #27 /var/www/html/magento2/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(273): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callPlugins() #28 /var/www/html/magento2/vendor/magento/framework/Model/AbstractModel.php(655): Magento\Catalog\Model\ResourceModel\Product\Interceptor->save() #29 /var/www/html/magento2/generated/code/Magento/Catalog/Model/Product/Interceptor.php(2442): Magento\Framework\Model\AbstractModel->save() #30 /var/www/html/magento2/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(142): Magento\Catalog\Model\Product\Interceptor->save() #31 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Controller\Adminhtml\Product\Save->execute() #32 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() #33 /var/www/html/magento2/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #34 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() #35 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #36 /var/www/html/magento2/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() #37 /var/www/html/magento2/vendor/magento/framework/App/Action/Action.php(111): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute() #38 /var/www/html/magento2/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch() #39 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch() #40 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() #41 /var/www/html/magento2/app/code/WeltPixel/Backend/Plugin/Utility.php(76): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #42 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): WeltPixel\Backend\Plugin\Utility->aroundDispatch() #43 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #44 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() #45 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #46 /var/www/html/magento2/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() #47 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(186): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch() #48 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(118): Magento\Framework\App\FrontController->processRequest() #49 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch() #50 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent() #51 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #52 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins() #53 /var/www/html/magento2/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch() #54 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #55 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch() #56 /var/www/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run() #57 {main} Fatal error: Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /var/www/html/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 4020 in /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 [internal function]: Magento\Framework\App\ErrorHandler->handler() #1 /var/www/html/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(4020): trigger_error() #2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct() #3 {main} thrown in /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php on line 61

connect to existing catalog

how to connect to existing catalog, every time I try re-connect to the existing always force create new Ad account which is only allowed one account (test account)

Configurable products with wrong url

Catalog synced successfully but having an issue with URL of configurable products example - configurable product has 5 variations of sizes, but configurable product URL in the Facebook catalog is showing with child product URL which is 404, so please look into this issue.

Multistore

Hello.

Now it's possible to organize only one connection to FB, however Magento supports creation of several websites.
Do you have plans to implement support of multistore connections to FB (own FB account for each Magento store)?
If yes, when release can be expected.

Thank you.

Can't connect without connecting to Instagram

When I use the wizard to setup I can't get past the option for having to choose an Instagram account, I do have a page but it isn't eligible as it doesn't have enough established presence, but the setup doesn't let me skip the step so I can't configure?

Am I missing something?

View product details report 500 errors

2021/06/15 10:17:48 [error] 24894#24894: *956277 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'FacebookAds\Object\ServerSide\UserData' not found in /opt/wwwdata/store/app/code/Facebook/Businesion/Helper/ServerEventFactory.php:28
Stack trace:
#0 /opt/wwwdata/store/app/code/Facebook/BusinessExtension/Helper/ServerEventFactory.php(167): Facebook\BusinessExtension\Helper\ServerEventFactory::newEvent('Search', '32342e4b-1792-4...')
#1 /opt/wwwdata/store/app/code/Facebook/BusinessExtension/Observer/Search.php(69): Facebook\BusinessExtension\Helper\ServerEventFactory::createEvent('Search', Array, '32342e4b-1792-4...')
#2 /opt/wwwdata/store/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Facebook\BusinessExtension\Observer\Search->execute(Object(Magento\Framework\Event\Observer))
#3 /opt/wwwdata/store/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Facebook\BusinessExtension\Observer\Search), Object" while readinnse header from upstream, client: 12.0.0.1, server: www.store, request: "GET /catalogsearch/result/?q=Otool HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "www.store.com", referrer: "/"

Google product attributes & Facebook Attribute Group

I installed the latest version of the extension via composer into Magento 2.4 instance.

As per the manual I don't see the referenced Google product attributes or Facebook Attribute Group in my magento instance. The lack of these attributes causes an error on FB and products don't want to sync.

How do I get the Google product attributes & Facebook Attribute Group available in my instance?

product available in magento but not on facebook

Magento 2.4.2 CE
facebook-for-magento2 1.4.2

The products on the site are available in stock, once synchronized with the module they are not available on facebook, I have to modify them as available from the facebook catalog.

I use the multi inventory of magento (maybe this information can be useful).

Facebook Catalog displays incorrect product links

Hi, I was able to successfully complete the Facebook Business Extension installation and setup but I noticed that the website links generated for products on my facebook shop/catalog are incorrect. the links generated directs customers to my admin panel instead of the product page of my website. Please how can I fix this? See incorrect URL displayed in screenshots below.

Screenshot 2021-04-12 at 19 49 25
wrong URL Screenshot 2021-04-10
Wrong URL_Screenshot 2021-04-10

Fatal error: Uncaught Error: Call to undefined method Facebook\BusinessExtension\Model\System\Config::getOutOfStockThreshold()

m2 2.3.6
facebook/facebook-for-magento2 1.2.6

  • open a product detail page via magento admin and save the product.
  • error: Fatal error: Uncaught Error: Call to undefined method Facebook\BusinessExtension\Model\System\Config::getOutOfStockThreshold() in vendor/facebook/facebook-for-magento2/Model/Product/Feed/Builder/Inventory.php:126

so there is this call: $this->systemConfig->getOutOfStockThreshold()
if I look at this class
Facebook\BusinessExtension\Model\System\Config as SystemConfig;
I don't find any method like getOutOfStockThreshold

Items on facebook appear as "out of stock"

magento 2.4.2
facebook-for-magento2 1.2.4

Most of the products are valid for the facebook/instagram catalog but "out of stock" even if they are available on magento.
Could there be a problem with the Multi-Source Inventory present on the latest versions of magento?

Thank you.

Error, it is not possible to make changes to the product registration

After installing the module. The product registration has an error when saving any changes.
see video
https://share.vidyard.com/watch/XcF4cX6iSwdJyBqXjcPWys?

Error: Call to undefined method Facebook\BusinessExtension\Model\System\Config::getOutOfStockThreshold() in /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder/Inventory.php:126 Stack trace: #0 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Builder.php(362): Facebook\BusinessExtension\Model\Product\Feed\Builder\Inventory->getAvailability() #1 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Model/Product/Feed/Method/BatchApi.php(69): Facebook\BusinessExtension\Model\Product\Feed\Builder->buildProductEntry() #2 /var/www/html/magento2/app/code/Facebook/BusinessExtension/Observer/ProcessProductAfterSaveEventObserver.php(57): Facebook\BusinessExtension\Model\Product\Feed\Method\BatchApi->buildProductRequest() #3 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Facebook\BusinessExtension\Observer\ProcessProductAfterSaveEventObserver->execute() #4 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #5 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #6 /var/www/html/magento2/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch() #7 /var/www/html/magento2/vendor/magento/framework/Model/AbstractModel.php(829): Magento\Framework\Event\Manager\Proxy->dispatch() #8 /var/www/html/magento2/vendor/magento/module-catalog/Model/Product.php(974): Magento\Framework\Model\AbstractModel->afterSave() #9 /var/www/html/magento2/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Product->afterSave() #10 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute() #11 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() #12 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch() #13 /var/www/html/magento2/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch() #14 /var/www/html/magento2/vendor/magento/framework/EntityManager/EventManager.php(51): Magento\Framework\Event\Manager\Proxy->dispatch() #15 /var/www/html/magento2/vendor/magento/framework/EntityManager/Operation/Update.php(110): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent() #16 /var/www/html/magento2/vendor/magento/framework/EntityManager/EntityManager.php(96): Magento\Framework\EntityManager\Operation\Update->execute() #17 /var/www/html/magento2/vendor/magento/module-catalog/Model/ResourceModel/Product.php(758): Magento\Framework\EntityManager\EntityManager->save() #18 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\ResourceModel\Product->save() #19 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callParent() #20 /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(58): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #21 /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Product.php(28): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->addCommitCallback() #22 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Product->aroundSave() #23 /var/www/html/magento2/vendor/magento/framework/App/Cache/FlushCacheByTags.php(69): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #24 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave() #25 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Product\Interceptor->Magento\Framework\Interception\{closure}() #26 /var/www/html/magento2/generated/code/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(39): Magento\Catalog\Model\ResourceModel\Product\Interceptor->___callPlugins() #27 /var/www/html/magento2/vendor/magento/framework/Model/AbstractModel.php(655): Magento\Catalog\Model\ResourceModel\Product\Interceptor->save() #28 /var/www/html/magento2/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php(142): Magento\Framework\Model\AbstractModel->save() #29 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Controller\Adminhtml\Product\Save->execute() #30 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() #31 /var/www/html/magento2/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #32 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() #33 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #34 /var/www/html/magento2/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(26): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() #35 /var/www/html/magento2/vendor/magento/framework/App/Action/Action.php(111): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute() #36 /var/www/html/magento2/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch() #37 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch() #38 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() #39 /var/www/html/magento2/app/code/WeltPixel/Backend/Plugin/Utility.php(76): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #40 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): WeltPixel\Backend\Plugin\Utility->aroundDispatch() #41 /var/www/html/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #42 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() #43 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() #44 /var/www/html/magento2/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() #45 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(186): Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch() #46 /var/www/html/magento2/vendor/magento/framework/App/FrontController.php(118): Magento\Framework\App\FrontController->processRequest() #47 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch() #48 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent() #49 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() #50 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins() #51 /var/www/html/magento2/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch() #52 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #53 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch() #54 /var/www/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run() #55 {main} Fatal error: Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /var/www/html/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 4020 in /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 [internal function]: Magento\Framework\App\ErrorHandler->handler() #1 /var/www/html/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(4020): trigger_error() #2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct() #3 {main} thrown in /var/www/html/magento2/vendor/magento/framework/App/ErrorHandler.php on line 61

An FBR Installation or Catalog does not exist

Hey, finally 1.4.0 is working, however upon pushing the product I get below error in the facebook log file.

Pushing batch 1 with 29 products [] []
[2021-04-13 23:05:23] FBE.INFO: Store id---1 [] []
[2021-04-13 23:05:23] FBE.INFO: Months since last update : 0 [] []
[2021-04-13 23:05:23] FBE.INFO: Catalog Batch API - https://graph.facebook.com/v10.0/fbe_catalog/batch?fbe_external_business_id=fbe_magento_1_607623b33eb38 [] []
[2021-04-13 23:05:23] FBE.INFO: Product push response "{\"error\":{\"message\":\"(#33) An FBE installation or associated Catalog does not exist for the business with ID fbe_magento_1_607623b33eb38, or cannot be loaded due to missing permissions\",\"type\":\"OAuthException\",\"code\":33,\"fbtrace_id\":\"A66Xa-pxOKx3qwN5uYDRGC4\"}}" [] []

Problems with full page caching

Hi

I can see that if magento 2 full page cache is enabled, pixel event_id is caching too, and i can receive warning that "received same event identifier for multiple event instances', beacuse this page always sends same event_id.

image

How can I solve this problem?

Prices are sent with no taxes applied and not all the products are being uploaded

We installed the Magento module https://marketplace.magento.com/facebook-facebook-for-magento2.html in a shop and we are facing a couple problems, but we haven’t found the answer in the user guide.

  1. The module sends some products to FB but just a part. It sends simple products (with visibility = catalog,search) but it is not sending for example, grouped products (grouped products have no price, and this could be the reason) neither its associated simple products (with visibility = Not visible individually)
  2. The price goes without taxes. Is there a way to show it incluing taxes or there is any reason?

Is there any documentation where I can find some help for these points?

Can't Save Some Products in the Magento Admin

After installing this module we are receiving the following error when saving some products in the Magento admin:
The stock item with the "11272" ID wasn't found. Verify the ID and try again.

image

Magento Open Source v2.4.1

The bug exists in app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php

The get function for loading stock expects the item_id to be passed. item_id is a unique identifier for the table - NOT for the product. But the function call is passing the product_id.

$stock = $this->_fbeHelper->createObject(StockItemRepository::class)->get($product->getId());

The majority of the time the item_id and product_id do match in table cataloginventory_stock_item, but that is not a reliable assumption.

image

mysql> SELECT count(*) FROM cataloginventory_stock_item;
+----------+
| count(*) |
+----------+
|    11393 |
+----------+
1 row in set (0.01 sec)

mysql> SELECT count(*) FROM cataloginventory_stock_item WHERE item_id <> product_id;
+----------+
| count(*) |
+----------+
|     9683 |
+----------+
1 row in set (0.00 sec)

This is the safe way to load the products stock based on the product_id:

git diff app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php
diff --git a/app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php b/app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php
index 61066758d..4dd9a3662 100644
--- a/app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php
+++ b/app/code/Facebook/BusinessExtension/Model/Feed/ProductFeed.php
@@ -56,14 +56,18 @@ class ProductFeed

     protected $enhanced_catalog_helper;

+    private $stockItemRepository;
+
     /**
      * Constructor
      * @param FBEHelper $helper
+     * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry
      */
-    public function __construct(FBEHelper $helper, EnhancedCatalogHelper $enhanced_catalog_helper)
+    public function __construct(FBEHelper $helper, EnhancedCatalogHelper $enhanced_catalog_helper, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry)
     {
         $this->_fbeHelper = $helper;
         $this->enhanced_catalog_helper = $enhanced_catalog_helper;
+        $this->stockRegistry = $stockRegistry;
     }

     protected function isValidCondition($condition)
@@ -385,7 +389,8 @@ class ProductFeed

         $request = [];
         /** @var Item $stock */
-        $stock = $this->_fbeHelper->createObject(StockItemRepository::class)->get($product->getId());
+        $stock = $this->stockRegistry->getStockItem( $product->getId() );

         $request[self::ATTR_METHOD] = $method;
         $this->dedup_ids[$product->getId()] = true;

Why force entity_id as content_id - Should allow to use SKU - This is in facebooks guide

Hi I am reporting that your module forces the use of product_id for content_id and should be allowed to use SKU for content_Id as this is in facebooks own guidelines as seen here: https://www.facebook.com/business/help/120325381656392?id=725943027795860

People have been requesting this feature from your module for over 2 years (see facebookarchive/facebook-for-magento#98 and facebookarchive/facebook-for-magento#95)

And for some reason it still has not been incorporated even though in your own guides you recommend this.

Now any merchant who installs this who have been using feeds as instructed by facebook will have their product catalog and all the history lost because you can't change a content ID, it will create a new product in facebook.

Configurable Product (Out Of Stock) issue

Hey, I have a question regarding Configurable products. I have around 8 configurable products with attribute Size (S, M, L, XL). Firstly, I see these products in the catalog with all sizes e.g. [ProcuctName-S], [ProcuctName-M], [ProcuctName-L]... Whereas, I would like these products to only show (one) general and probably information about the sizes available. As for now what I understand is, that the current catalog shows same product 4 times with only difference of Size.

Secondly, I do not have any Out Of Stock product, But these configurable product (this time without the attribute/size) are shown as out of stock. Please check the image below:

https://i.imgur.com/tV0e67K.png

P.S: I am using Extension v.1.4.0

Site conflict

Hi,

I am running magento 2.3.6-p1 and have followed instructions to install.
Install goes well, im able to setup FB business manager and link in the mage back end.
This successfully connects but as long as this module is linked and running none of my sites category pages or products load.
Home page and account login pages load.

No error messages are being displayed on the front end or back end.

Please advise.

Thanks

module:uninstall not deleting the database tables so after uninstall & disabling of the module source_model classes in eav_attribute table will stay and will prevent admin user in admin to go to product pages

As the title says the bin/magento module:uninstall does not remove Facebook For Business database tables nor module created eav_attributes. We had to manually remove this when we were uninstalling this module because eav_attribute attributes will stay and will prevent admin user in admin to go to catalog/product with exception.

facebook_software_system_requirements too long

I would like install this module on magento 2.2.9

However, when php bin/magento setup:upgrade, I get this error:

Module 'Facebook_BusinessExtension':
Upgrading data... An attribute code must not be less than 1 and more than 30 characters.

So it fails on this attribute: facebook_software_system_requirements which is indeed 37 characters long.

What can be done about it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.