• Resolved Akkon

    (@akkon)


    Hi all, thanks for the great plugin.

    I have an issue with regular prices – in my feed they seeem to be without VAT. Is there any possibility how to change the output to prices with VAT? I am using free version of the plugin.

    Thanks!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author AukeJomm

    (@aukejomm)

    Hello Akkon,

    What you can do is click the (edit value) link and select recalculate from the dropdown.
    Than select the multiple function and multiple the price attribute with your VAT rate.

    Like for the Netherlands that’s 21% so multiple with 1.21

    Thread Starter Akkon

    (@akkon)

    Hello Auke,
    thank you for your help. This solution works if the price tax is the same for all the products.

    It would be great if the plugin can calculate the price by itself by VAT group selected for each product the same way Woocommerce calculates the final price of each product…

    Plugin Author AukeJomm

    (@aukejomm)

    Yes, i understand that would be good to have.
    I will discuss this with the developer.

    An other solution would be adding this little wordpress filter to your functions.php

    https://gist.github.com/Auke1810/3517e1c5a19f372ca2a4bcf3eda8b3d7

    It will add the price including tax to the price attribute.

    Let me know if that works for you.

    Thread Starter Akkon

    (@akkon)

    Thanks Auke, this seems to work!
    This is exactly the solution I was looking for πŸ™‚

    Thread Starter Akkon

    (@akkon)

    Hello Auke,
    I am getting back to this thread because the solution works just partly.

    I did add the snippet to functions.php and when I save and regenerate the feed it does apply.

    But When the feed is regenerated automatically, It pushes back the price without VAT (the filter you adviced is not applied).

    Do you have any solution for that?
    Thanks

    Plugin Author AukeJomm

    (@aukejomm)

    Hey @akkon,

    Are you sure it is not working?
    The filter should work also in an autoupdate.

    Auke.

    Thread Starter Akkon

    (@akkon)

    Hello @aukejomm,
    yes, I am absolutely sure. When I save the feed from WP admin manually (by “save and generate feed”), the data are ok, but after the time specified in “Update schedule” the prices get back to without VAT

    Thanks for any help

    Plugin Author AukeJomm

    (@aukejomm)

    Hello Akkon (@akkon),

    I am not sure why this is not working.
    We are looking in to it but for now i do not have an answer.

    I will reply soon when i am able to replicate the issue.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello @akkon,

    Could you please try the following steps:

    1) Make a new folder in your wp-content/plugins folder and call this folder site-specific-functions
    2) Add a new file to this folder and call it site-specific-functions.php
    3) Add the following to this file:

    <?php
    /*
     Plugin Name: Site Specific Functions
     Description: Plugin that can be used as a template for custom hooks
     */

    4) Then below that text, add the function you got from Auke and add it below the text from the previous step
    5) Open the Plugins page on your wp-admin account. If everything is OK you should find a new plugin called Site Specific Function in your plugins list.
    6) Activate that plugin and test if this solves the issue.

    Let us know if this works.

    Best regards,
    Michel

    Thread Starter Akkon

    (@akkon)

    Hello Michel (@michel-jongbloed),
    thank you for your post.

    I did try that, but the outcome is still the same. After some time, the feed shows the price without VAT.

    One idea – the sheduled re-generation of the feed was set on 10 (Every [1] day as [10]:[00] for [1] times a day. I am not sure how the automatic launch is performed, (I did not set any CRON job) but the feed was automatically re-generated at 10:16. And this version is again without VAT. Why it was not regenerated at 10:00 ? There was traffic on the web around 10.

    Best regards
    Karel / akkon

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi Karel,

    I’ll have to perform some tests to see if I can replicate this issue.

    In the mean time, what version of our plugin are you using?

    Best regards,
    Michel

    Thread Starter Akkon

    (@akkon)

    Hello Michel,
    if I can help you with the replication of the issue, please contact me.

    I am using version 1.7.4 which is, i believe the newest version.

    Best regards
    Karel

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hello Karel,

    Could you try to change the “get_price_including_tax()” function into “wc_get_price_including_tax()” in the site-specific-function.php file and check if that solves the issue?

    Best regards,
    Michel

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi Karel,

    Where you able to test the change I mentioned above? Or would you prefer that I send you a file update including this change?

    Best regards,
    Michel

    Thread Starter Akkon

    (@akkon)

    Hello Michel, sorry for the late reply, I got locked (dunno why) from logging in to this forum :).

    Unfortunately, the change did not helped. The feed still produces prices without VAT when triggered automatically.

    Can I help you with the debugging?

    Kind regards
    Karel

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Regular price with VAT’ is closed to new replies.