Forum Replies Created

Viewing 15 replies - 1 through 15 (of 73 total)
  • Plugin Author pbosakov

    (@pbosakov)

    Hello, the issue you reported should now be fixed in the new version (1.0.10). Let me know if you continue experiencing any problems. Thanks!

    Plugin Author pbosakov

    (@pbosakov)

    Hi, you can try the new version release. It improves the handling of button clicks and might possibly fix the issue with popups that you have been experiencing.

    Please note that you can have only have one calculator form per page, even if it is in a hidden area (such as a pop-up).

    Plugin Author pbosakov

    (@pbosakov)

    Dear Manu,

    You can try adding this post-processing Javascript to your website.

    jQuery(function($) {
      $('form').on('wpcf7calculate', function() {
        $('.wpcf7-calculation').each(function() {
          $(this).val(parseFloat($(this).val()).toFixed(2));
        });
      });
    });

    Hi, while we are waiting for an official plugin update that will hopefully introduce support for these new fields, here is a quick temporary fix that we added to our theme’s functions.php file in order to inject the extra info into the metadata of all our events.

    /* all events moved online due to COVID-19 */
    if (!function_exists('custom_event_schema_extras')) {
      function custom_event_schema_extras($_data, $args, $event) {
        $_data->eventStatus = 'EventMovedOnline';
        $_data->eventAttendanceMode = 'OnlineEventAttendanceMode';
        return $_data;
      }
      add_filter('tribe_json_ld_event_object', 'custom_event_schema_extras', 10, 3);
    }
    Plugin Author pbosakov

    (@pbosakov)

    Hello!

    I am going to reply with regard to the free version, because I am not allowed to provide support for the Pro version on these forums. However, my reply is valid for both versions of the plugin.

    My calculator plugin does have a limited ability to use date fields as inputs, but it cannot yield a date in its final output; it always has to be a number. You would therefore need an extra post-processing JavaScript to “translate” the number of weeks into a future date.

    For a simple date calculation such as the one from your example, I would suggest that you skip my plugin altogether and code your own ad hoc embedded Javascript calculator. It will work well enough without the need for any server-side processing. Since the calculation formula is simple and is not confidential, it can be calculated directly in the visitor’s browser.

    Plugin Author pbosakov

    (@pbosakov)

    Hi, thank you for reporting this. These forums are only for supporting the free version of the plugin hosted on wordpress.org. If you can kindly repost your issue on the Pro version forum, I would be happy to provide support there. Thanks!

    Plugin Author pbosakov

    (@pbosakov)

    You can trigger calculation programmatically from your own Javascript code by calling the cf7Calculate function. It takes as a single argument a jQuery object constructed from the respective form element. For example:

    <script>
    jQuery(document).ready(function($){
        var recalc = function() {
            // Find any forms on the current page and activate the calculations
            cf7Calculate(jQuery('form'));
        };
      jQuery('.wpcf7-form select').on('change', function() {
        cf7Calculate(jQuery(this).closest('form'));
      });
    });
    </script>
    Plugin Author pbosakov

    (@pbosakov)

    Hello,

    Yes, you can achieve something similar with my calculator plugin. Drop-downs are a premium feature, but with the free version hosted here on wordpress.org you can easily enter kilograms and obtain a price quote.

    Just FYI, the site you sent me as an example uses a different proprietary WordPress plugin which you might also consider for your needs: https://codecanyon.net/item/cost-calculator-wordpress-plugin/12778927

    Best regards,
    Petko

    Plugin Author pbosakov

    (@pbosakov)

    Hi, you have actually run into a limitation of the plugin. You can only have one calculated field on the same page (inline or in a popup).

    To work around that, you can use iframes in your popups (I believe there are third-party plugins for that).

    Alternatively, you may look into the Pro version of my plugin which does not have this limitation.

    Hope this helps!

    Best regards,
    Petko

    Plugin Author pbosakov

    (@pbosakov)

    Hello, I am not sure I understand your question. Could you please give me an example of the input and output that you are looking to obtain?

    Plugin Author pbosakov

    (@pbosakov)

    Hello and thank you for reporting this!
    Could you please provide a link to a page where the problem can be seen so I can look into it?

    pbosakov

    (@pbosakov)

    Hello, I tested it with version 4.7.7 and it works like a charm. Thanks!

    Plugin Author pbosakov

    (@pbosakov)

    Hi, due to a limitation in the tokenizer module, the calculator fails to correctly interpret the minus sign before the parenthesis in your formula.

    To work around that, try changing it to the following:

    [calculation wynik precision:2 "(d + e + f + g + h)*(-1*((c / b)-1))"]

    Hope that helps!

    Plugin Author pbosakov

    (@pbosakov)

    Hi Laurent,

    The “precision” option will always round to the nearest integer.

    If you want to round up instead, you have two options.

    Option 1: you can remove the “precision” option and instead use a JavaScript event handler that fires after the calculation and does the rounding. This is an example:

    jQuery(function($) {
        $('form').on('wpcf7calculate', function() {
            var $field = jQuery('.wpcf7-calculation');
            $field.val(Math.ceil(parseFloat($field.val())));
        });
    });

    Option 2: the Pro version of the calculator plugin supports the “roundup” and “rounddown” options in addition to the “precision” option, so it will let you easily control the direction in which results are rounded. If you have any pre-sales or support questions related to the Pro version, you can contact me on my website.

    Hope that helps!

    Plugin Author pbosakov

    (@pbosakov)

    Hi,

    Your formula seems to be incorrect. Try this instead (derived from the annuity formula):

    [calculation total precision:0 "loanamount * (1 + 2.3 / 12 * 0.01) ^ (years * 12) * 2.3 / 12 * 0.01 / ( (1 + 2.3 / 12 * 0.01) ^ (years * 12) - 1)"]

    This should give you a result comparable to other online loan calculators.

Viewing 15 replies - 1 through 15 (of 73 total)