[SOLVED] awspcAfterCalculatePrice returns too fast

Home – SaaS Forums Support questions WooPrice Calculator (Pro) [SOLVED] awspcAfterCalculatePrice returns too fast

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5542
    Marnick Menting
    Participant

    I am using the new jQuery triggers to trigger custom actions. This is a sample code:

    $(document).bind('awspcAfterCalculatePrice', function(e) {
    console.log(new Date().getTime());
    });

    $(document).bind('awspcBeforeCalculatePrice', function(e) {
    console.log(new Date().getTime());
    setTimeout(function() {goToNextStep(); }, 500);
    });

    I want to trigger an event after the call to admin-ajax.php?task=price_callback&action=awspricecalculator_ajax_callback is returned. But it seems the awspcAfterCalculatePrice is triggered earlier, because the style=”display:none” of the awspc-field-row td’s are not changed yet, I need to wait 500ms. Can I hook to that Ajax response somehow?

    #5545
    Marnick Menting
    Participant

    And maybe related to this, maybe not: I would like to receive the errorCount of the ajax call admin-ajax.php?task=price_callback&action=awspricecalculator_ajax_callback. Is there a way to catch it and do my own jQuery stuff with it?

    #5544
    Enrico
    Participant

    Hi Marnick,

    I’ve updated the documentation here: https://altoswebsolutions.com/manual/woo-price-calculator/jquery-triggers

    Here you can find the trigger “awspcAjaxCalculatePriceSuccess”, which is exactly what you’ve described.

    You also need to upgrade to the bugfix version 2.2.16, you can download it here: [I’ve sent the URL to you via email to your email address]

    You can find instructions how to install the bugfix here: https://altoswebsolutions.com/manual/woo-price-calculator/install-bugfix

    Kind Regards,
    Enrico
    AT471

    #5543
    Marnick Menting
    Participant

    Wow, awesome! Thank you very much.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.