[SOLVED]awspricecalculator_ajax_callback manually

Home – SaaS Forums Support questions WooPrice Calculator (Pro) [SOLVED]awspricecalculator_ajax_callback manually

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5764
    DonQuichotte
    Participant

    Hi is there a way to manually trigger the “awspricecalculator_ajax_callback”?

    I have a shop with stickers, where the customer can choose the form of it, so when the customer want a circle form of a sticker, he dont have to input the height of his sticker.. the height is calculated automaticaly by choosen width and a ratio.. like circle width * 1
    But than i dont have the value anymore on the backend bc the height input field is deactived if he chooses a circle form.. how can i manually trigger sending the height value?? or something similar..

    https://screenshots.firefox.com/D8pDwtxkyx784AWt/aufklebermacher.at

    thanks in advance

    #5769
    DonQuichotte
    Participant

    can you help me with it? its pretty urgent 🙁

    thanks

    #5768
    Anonymous
    Guest

    Hello,
    If you are a technician we can give you some suggestions otherwise i guess is better that we can do this task directly. In this second case unfortunately we have to make a quotation.
    Please let me know which one you prefer.

    Best regards
    Ennie
    AT101

    #5767
    DonQuichotte
    Participant

    Hello Ennie,

    Yes some suggestions will be enough, thanks 🙂

    best regards

    #5766
    DonQuichotte
    Participant

    Hi,

    Am i on the right way? littlebit help would be appreciated..
    i am adding this to the main.js

    $(document).on(‘change’, ‘.hoehe’, function(){
    newvalue = $(this).innerHtml;
    $(‘#aws_price_calc_4 input’).value = newvalue;
    WooPriceCalculator.calculatePrice();

    });

    #5765
    Anonymous
    Guest

    Hi,

    Yes you’re on the right way, I think it should work now, but please here are some considerations:

    1) It’s better to add custom javascript outside the plugin, otherwise new updates will remove your code

    To do that you can add this code in your THEME functions.php:

    function my_custom_scripts() {
    wp_enqueue_script( ‘custom-script’, get_template_directory_uri() . ‘/js/my-custom-scripts.js’, array( ‘jquery’ ));
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_custom_scripts’ );

    So you can create a file in your THEME/js/my-custom-scripts.js

    Here you can insert the code you wrote.

    2) Make sure the “newvalue” is a correct value for “aws_price_calc_4”. I mean, what kind of field is #aws_price_calc_4? a numeric field, option field, etc?

    Best regards
    Ennie
    AT101

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