Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FinalPrice pushed as exclude tax from PDP #312

Open
mamsincl opened this issue Sep 20, 2024 · 2 comments
Open

FinalPrice pushed as exclude tax from PDP #312

mamsincl opened this issue Sep 20, 2024 · 2 comments

Comments

@mamsincl
Copy link

mamsincl commented Sep 20, 2024

Environment details

PHP version: 8.1.28
Magento version: 2.4.5-p9
Klaviyo extension version: 4.1.3
(Magento Cloud, so please do not judge the php version)

Steps to reproduce

Visit PDP
check the rendered klaviyo.push payload: discrepancy in FinalPrice and the rendered price for the end customer
image

Expected result

FinalPrice is set to be the same as the rendered price

OR

the FinalPrice should follow the visibility setting of product price

Actual result

final price without tax added to JSON payload

Additional information

https://github.com/klaviyo/magento2-klaviyo/blob/master/Block/Catalog/Product/ViewedProduct.php#L161

when this being changed to use getAmount()->getValue() on the final price object - instead of getValue(), the include tax price being added as FinalPrice

also, please see
https://belvg.com/blog/the-functionality-and-basic-concepts-of-price-generation-in-magento-2.html
image

@mamsincl
Copy link
Author

some extra info: our client has conversation with support and they given the following answer:

  • If you're working with a Magento 2 integration and need to ensure that product prices in your Klaviyo email campaigns include VAT, there are several steps you can take to address this issue effectively.
  • Firstly, it's important to make sure that your Magento 2 store is configured to display prices inclusive of VAT. This can be adjusted in the Magento admin panel under Stores > Configuration > Sales > Tax > Price Display Settings. Here, you should set the options to ensure that the prices shown to customers on your storefront include VAT. This ensures that the prices your customers see on your website are consistent with what they see in your email campaigns.
  • You can find more information in this article: How to Configure Value Added Tax (VAT) in Magento 2.
  • Next, to ensure that VAT-inclusive prices are reflected in Klaviyo, you need to confirm that the pricing data being sent from Magento to Klaviyo includes VAT. By default, Klaviyo pulls the price data directly from Magento, and if Magento is set to display prices without VAT, Klaviyo will do the same. To correct this, you may need to customize the integration or work with a developer to ensure that the prices sent to Klaviyo are VAT-inclusive. This might involve modifying how prices are calculated and passed through Magento’s API to Klaviyo.
  • If VAT-inclusive prices are properly synced to Klaviyo, you can then customize your email templates in Klaviyo to ensure that the correct pricing is displayed. When setting up your product blocks, make sure they are configured to pull the pricing data that includes VAT. If the integration still doesn’t automatically reflect VAT-inclusive prices, a workaround could involve using custom properties or scripts within Klaviyo to manually adjust the prices displayed in the emails. However, this approach would require some coding knowledge.
  • For example in order to add a percentage of 20% you will need to use the tag multiply, as per this example the code would be {% currency_format item.line_price|multiply:1.2 %}

@smoucka
Copy link
Contributor

smoucka commented Sep 20, 2024

@mamsincl Thank you for filing this issue and submitting a PR. I have commented on #313.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants