• Resolved Flytrap

    (@flytrap21)


    There seems to be an error in calculating the cost (and thus the profit) in the admin orders meta box. It is possible that this error cascades to other parts of the calculations, I have not checked yet.

    Basically, the gateway fees are stored as a negative value and WooCommerce correctly adds this negative value to the total amount paid (i.e. subtracts the gateway fees from the amount paid) to calculate the net amount from the payment gateway.

    Screen grab: https://prnt.sc/ruCDX5PEmDZi

    The problem arises when Cost of Goods tries to calculate the total cost by adding all the costs together (item costs, gateway costs, etc.). In adding the negative gateway cost value the effect is to subtract it from the item costs, which ends up lowering the total costs by the value of the gateway costs, instead of increasing the total costs by the value of the gateway costs.

    Screen grab: https://prnt.sc/c0sMOEVnwolD

    I am guessing that after this, all order profitability reports would be wrong – unless this only happens in the admin orders meta box.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @flytrap21,

    Thanks for reaching out. I am really sorry to know you are experiencing problems.

    There seems to be an error in calculating the cost (and thus the profit) in the admin orders meta box.

    We have recently released a new version of the plugin (2.8.6) that fixes the issue. Please update your plugin to the latest version and see if the problem persists.

    Basically, the gateway fees are stored as a negative value and WooCommerce correctly adds this negative value to the total amount paid (i.e. subtracts the gateway fees from the amount paid) to calculate the net amount from the payment gateway.

    Regarding this issue, I couldn’t reproduce it on our end. As www.ads-software.com is so restrictive, could you please contact us through our forum so that we can discuss this topic further there?

    Kind regards,
    Moshtafizur

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    @moshtafizur01 Moderator note:

    You wrote “As www.ads-software.com is so restrictive, could you please contact us through our?forum?so that we can discuss this topic further there?” I assume you’re about to ask for a login to the user’s site.

    I’m am 100% sure you mean well but please <em>never ask for credentials on these forums.

    https://www.ads-software.com/support/guidelines/#the-bad-stuff

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for credentials will result in us escalating this to the plugins team.

    It’s never necessary to do that. Here’s why.

    There are many ways to get information you need and accessing the user’s site is not one of them. That’s going too far.

    <ul>

    <li>Ask for a link to the https://pastebin.com/ or https://gist.github.com log of the user’s web server error log.</li>

    <li>Ask the user to create and post a link to their phpinfo(); output.</li>

    <li>Ask the user to install the <a href=”https://www.ads-software.com/support/plugin/health-check/”>Health Check plugin</a> and get the data that way.</li>

    <li>Walk the user through <a href=”https://codex.www.ads-software.com/WP_DEBUG#WP_DEBUG_LOG_and_WP_DEBUG_DISPLAY”>enabling WP_DEBUG and how to log that output to a file and how to share that file.</a></li>

    <li>Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again.</li>

    <li>Ask the user for the step-by-step on how they can reproduce the problem.</li>

    </ul>

    You get the idea.

    Volunteer support is not easy. But these forums need to a safe place for all users, experienced or new. Accessing their system that way is a short cut that will get you into real trouble in these forums.

    Hi @sterndata,

    I apologize for any confusion or concern caused by my previous statement. I understand the importance of maintaining a safe and secure environment for users on the forums, and I assure you that, InshAllah, I will refrain from asking for login credentials going forward.

    Thank you for bringing this issue to my attention and providing alternative methods for gathering information and troubleshooting user issues. I ensure to follow these guidelines, and I appreciate the guidance provided.

    I would like to remind the users that to better assist you with your issue, can you please let us know which payment gateway plugin you are currently using? This information will help us understand your setup and provide a more accurate solution for your problem. We look forward to hearing from you and providing assistance.

    Once again, I apologize for any confusion caused and appreciate your guidance.

    Best regards,
    Moshtafizur

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error calculating cost in admin orders meta box’ is closed to new replies.