• Resolved sophiazey

    (@sophiazey)


    Hi Mark,
    First of all, this plugin is great.

    I am only experiencing this issue on the latest version. If I revert back to Version 3.9.2 I do not experience this issue.

    I have a variable product with 6 attributes, each with a different amount of terms. One product has 480 variations. The last attribute includes a markdown by percentage, e.g. -50%. When I use the bulk “Set Regular Prices” for a number less than 4 digits, like 900, the plugin works as expected, and applies the markups and discounts. If I go to 4 digits or higher (1000, 3000, etc.), the plugin only calculates the first few markups, and does not calculate the last discount attribute. This is reflected in the Regular price for every variation as well as the Description — the line for the last attribute will have an empty space where it should say the amount discounted (“Subtract for Discount A”).

    I tested an older version – v 3.9.2. and did not have this issue, so that is what I’m doing for now to make things work. For future plugin updates, would it be possible to take a look into this issue and resolve?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mark Tomlinson

    (@marktomlinson)

    Thanks for finding this.

    I’ve done some testing today, and found the problem exists in version 3.10, 3.10.1, and 3.10.3, but not 3.9.6. It also only affects percentage markups, and not fixed price markups. That will help me narrow it down.

    I take it from your comments, this is not a dealbreaker. In fact, I assume it’s rare to have a percentage markup or markdown that exceeds 999.99, since that requires a large percentage of an excessively larger price. However, it is a bug, so I’ll work on it and get a fix out soon.

    Thread Starter sophiazey

    (@sophiazey)

    Thanks @marktomlinson, you are right it is not a dealbreaker since I can use 3.9.6 in the meantime. Thanks again.

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    Turned out to be an easy fix. I had switched to using a function within WooCommerce for parsing out a price string, for better compatibility with some currency converters. However, that inserted a thousands-separator in the string, which created a conflict with PHP’s floating-point conversion. Apparently, PHP’s (float) casting bulks at commas, and will not convert beyond it. So, 1,234.56 becomes 1.00000, and 2,345.67 becomes 2.00000.

    I reverted to the original code at the point where it calculates percentage markups, and have released this as version 3.10.4.

    Hope that helps.

    Thread Starter sophiazey

    (@sophiazey)

    Wow, thanks Mark! That was quick. I just tried the newest version and it works well. Best, Sophia

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set regular price does not include last markup if price is over 4 digits (1000)’ is closed to new replies.