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

[Bug]: The price information under is invalid. Review for more details #86

Closed pratikvs closed 1 year ago

pratikvs commented 3 years ago

Contact Details

pratik.sonawadekar@borngroup.com

What happened?

Steps to reproduce

The issue lies in the file vendor/facebook/facebook-for-magento2/Model/Product/Feed/Builder.php in the function buildProductEntry(Product $product).

A Quick Fix for the issue.

and ltrim the the currecy symbol from the$this->getProductPrice($product) and $this->getProductSalePrice($product) .

The price formatting is not happening correctly in the function public function formatPrice($price) present in the file vendor/facebook/facebook-for-magento2/Model/Product/Feed/Builder.php

Magento Version

2.4.3 Enterprise Edition

Plugin Version

1.4.3

Relevant log output

{"success":true,"feed_push_response":["{\"validation_status\":[{\"retailer_id\":\"1895\",\"errors\":[{\"message\":\"The price information under is invalid. Review for more details\"}]},{\"retailer_id\":\"1893\",\"errors\":[{\"message\":\"The price information under is invalid. Review for more details\"}]},{\"retailer_id\":\"1850\",\"errors\":[{\"message\":\"The price information under is invalid. Review for more details\"}]}]}"]}

Code of Conduct

w8land commented 3 years ago

Excellent. This solution worked for me.

refaelgold commented 2 years ago

can you write up the code please? Im trying to change it to ltrim($this->getProductPrice($product)),

refaelgold commented 2 years ago
        self::ATTR_PRICE                => ltrim($this->getProductPrice($product),'₪'),
        self::ATTR_SALE_PRICE           => ltrim($this->getProductSalePrice($product),'₪'), 

i hope is that the right solution

im getting : Finished (response) ({"success":true,"feed_push_response":["{\"handles\":[\"AcwFgkVyVRWUX776jkzbvt40esI_u5Yd7dSFg0ZYS2QyfqzsOsuRoQrliSkmXAk9dyXNK1cYnhWcHz9dQYCqYXq5\"]}"]})

refaelgold commented 2 years ago

@pratikvs i whould like for your reponse . Im stucking badly with that issue

loopool commented 2 years ago

It was a bug in Magento 2.4.3, 2.4.4 has fixed this issue. https://github.com/magento/magento2/commit/ae304d43cd36322b1ff8145d70c9b2e9aeb0cde#diff-09a839078aa6453eb8fb437430724140207e2aa7214c3bb98bc7ced29fe39927R440-R443 fixed this issue