facebookarchive / facebook-for-magento

A first-party extension plugin built for Magento. This plugin will install a pixel on your site, upload your products into a catalog for use in FB ads, and (optionally) auto-create an FB shop with your products.
https://www.facebook.com/business/help/532749253576163
84 stars 57 forks source link

Products pulled through ex vat - when setting is Display Including And Excluding VAT #67

Open wildrness opened 6 years ago

wildrness commented 6 years ago

hi there the products are being pulled through to Fbook excluding Vat, how do I change this so prices are showing as including VAT?

dmitridr commented 6 years ago

Hi,

Thanks for writing in. Is this problem in all products or a specific subset of products?

22 was a similar problem, that was fixed with an upgrade and a Fetch Now. Can I confirm that you have the latest version of the plugin and have done a Fetch Now and the problem still persists? If you don't have the latest version (v2.4.2 as of this comment), please upgrade, as I suspect that may fix the issue.

Here is the relevant code in the plugin which fetches price: https://github.com/facebookincubator/facebook-for-magento/blob/v2.4.2/app/code/community/Facebook/AdsExtension/Model/FBProductFeed.php#L739-L749 As you can see we use the built in tax helper. If that's not working then maybe some other extension is conflicting with this behavior? If you're willing to dig into code, this is the area you'd want to look into to try and figure out why it's not pulling in VAT prices.

wildrness commented 6 years ago

I have updated to the latest version, and have run a number of fetches again and the issue is still happening.

wildrness commented 6 years ago

ok i have narrowed the issue down

if i have products displayed including AND excluding VAT then this issue arrises, if i have the products displaying including VAT then the issue is gone. hope that helps.

dmitridr commented 6 years ago

Thanks for tracking down the problem!

Can you go into detail about where you are changing the VAT setting for all products? A screenshot would help. Any other information you can provide in order for us to reproduce the problem on our test servers will be helpful.

I'm thinking about how we can fix this : The solution would probably be to detect the include AND exclude setting and apply VAT.

wildrness commented 6 years ago

system/config/sales/TAX

screen shot 2018-06-13 at 11 47 14
dmitridr commented 6 years ago

Thanks for this. I am strapped for time so may not be able to build this immediately, will update here when I have progress though!

kanenas commented 6 years ago

@dmitridr hi! Have you come up with a solution on this?

BB-000 commented 6 years ago

I'm having this issue with the latest version, I'm trying to debug,

But where is the 'fetch now' button..??

Read the 'full docs' and searched all the issues here and still can't find it. Is it in magento admin or somewhere on facebook?

EDIT: Found it. It was in the facebook settings popup step 3. I couldn't see it because the page had somehow become un-linked (probably because I set the shop to not-public?). I made another test page and set it to public, but hid the shop.

dmitridr commented 5 years ago

We have an open pull request for this #93, so you can try make the changes as in the pull request if you are having this issue. Unfortunately we can't merge the current pull request without changes as it has some issues.