• Resolved damniano

    (@damniano)


    I have a huge problem.

    I created a form for a customer and I have a lot of calculations.

    However, in the end, I have one field that should calculate the cost – Final Cost.

    I made a test order, I was supposed to pay £0.68, but I paid the customer £501.90 🙁

    What did I do wrong? Where did this amount come from?

    • This topic was modified 6 months, 3 weeks ago by damniano.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support TomStylemixThemes

    (@tomstylemixthemes)

    Hi @damniano

    Thanks for reaching out!

    Could you please share your calculator so I can test it in my environment?
    Please export the calculator and upload it to a file-sharing service such as https://www.file.io, then share the link with me.

    You can follow this guide to export your calculators in .txt format:
    https://docs.stylemixthemes.com/cost-calculator-builder/plugin-features/working-on-existing-calculators#export

    Looking forward to hearing from you!

    Kind regards

    Thread Starter damniano

    (@damniano)

    Plugin Support TomStylemixThemes

    (@tomstylemixthemes)

    Hi there

    Sorry for late response!

    I checked your calculator and noticed that some formulas use the OR condition. When this condition is used, the Advanced Calculations option must be enabled in the formula settings.

    I extracted the OR part of your formula and created a separate formula to calculate only that segment. Then I connected that formula to the total cost formula, and now the correct price is being sent to the orders.

    I’ve uploaded the updated calculator to the site and shared the download link with you.
    Please download it and test — hope it will be helpful!

    Here is link -> https://limewire.com/d/WbZcw#KHnYPfVSqG

    With regards

    Thread Starter damniano

    (@damniano)

    Hi @tomstylemixthemes

    Thank you.

    I imported the file from you, but I can’t test it.
    For some reason, I can’t make the payment (Stripe).
    I enter my card details and my information, click “Submit order,” it thinks for a moment, the wheel spins for a moment, and… nothing happens.
    Two errors appeared in the console.

    hsw.js:2 [Violation] 'message' handler took 194ms
    WidgetAPI.ts:29 POST https://www.liontek.co.uk/wp-admin/admin-ajax.php 500 (Internal Server Error)
    makeRequest @ WidgetAPI.ts:29
    handleSubmissionRequest @ handleOrderSubmission.ts:7
    createOrder @ useOrder.ts:644
    (anonymous) @ submissionStore.ts:150
    Promise.then
    submissionCreateOrder @ submissionStore.ts:136
    R @ pinia.mjs:1379
    j @ OrderFormList.vue:204
    ce @ OrderFormList.vue:198
    q @ Button.vue:47
    Qt @ runtime-core.esm-bundler.js:199
    Pe @ runtime-core.esm-bundler.js:206
    n @ runtime-dom.esm-bundler.js:729
    WidgetAPI.ts:36 API Request Failed (create_cc_order): SyntaxError: Unexpected token '<', "

    There h"… is not valid JSON
    makeRequest @ WidgetAPI.ts:36
    await in makeRequest
    handleSubmissionRequest @ handleOrderSubmission.ts:7
    createOrder @ useOrder.ts:644
    (anonymous) @ submissionStore.ts:150
    Promise.then
    submissionCreateOrder @ submissionStore.ts:136
    R @ pinia.mjs:1379
    j @ OrderFormList.vue:204
    ce @ OrderFormList.vue:198
    q @ Button.vue:47
    Qt @ runtime-core.esm-bundler.js:199
    Pe @ runtime-core.esm-bundler.js:206
    n @ runtime-dom.esm-bundler.js:729
    structural-steel-calculator/:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

    I don’t quite understand how to look for the problem.

    Importantly, the orders appeared in the “Orders” tab. But they weren’t paid for. And I still see something like £501.90 there…

    • This reply was modified 6 months, 2 weeks ago by damniano.
    Thread Starter damniano

    (@damniano)

    Hi @tomstylemixthemes

    Could you manage to find a moment for me?

    Plugin Support TomStylemixThemes

    (@tomstylemixthemes)

    Hi @damniano

    Sorry for making you to wait for reply!

    I had uploaded only .txt version of your calculator after editing some formula fields. I have tested it in my environment and recorded the process – https://share.zight.com/12uZo67y

    Here you can see the stripe history – https://prnt.sc/7O11I30n4Z_v

    Also i will give another link to site where you can download the calculator – https://limewire.com/d/vZGox#O2e9zJsBWa

    Hope this will be useful!

    Kind regards

    Thread Starter damniano

    (@damniano)

    Hello @tomstylemixthemes

    I can’t solve this problem. I still get an internal error after clicking the ‘submit order’ button and an error in WidgetAPI.ts.

    I tried to debug it, but… I updated the plugin to version 3.6.7 and now the order button has disappeared completely…

    Thread Starter damniano

    (@damniano)

    Plugin Support juliastylemixthemes

    (@juliastylemixthemes)

    Thank you for your kind diligence

    The internal server error occurs due to your server configurations. Try to check and test on a clean local environment and with proper server limits as described in the plugin doc. We tested your calculator, and that worked on our side; that means that the issue doesn’t come from the plugin itself.

    Best regards

    Thread Starter damniano

    (@damniano)

    Hi @juliastylemixthemes

    I have no idea anymore.

    The errors were caused by uBlock, but I disabled it.

    Since you fixed my calculator, I haven’t been able to test it.

    The Stripe configuration is very simple – I copy two keys and that’s it.

    I enter the card number, date, CVV and… nothing happens. The calculator spins the wheel three times and nothing happens. The thank you page does not appear.

    This only happens with Stripe. When I disable Stripe and enable ‘Cash Payment’, everything works fine.

    Am I missing something? Are there any cookies or your settings left? Is that possible? Because I also noticed that when I remove the plugin and reinstall it, all settings are retained. I tried to ‘reset’ the plugins somehow, but I don’t know how…

    Thread Starter damniano

    (@damniano)

    Hi @juliastylemixthemes & @tomstylemixthemes

    I KNOW!!!

    Do you still have my calculator file?

    Stripe payment works for the first product, i.e. All RJS Steel Beams. It doesn’t work for the others. But I don’t know why.

    I have noticed with other products that when I try to pay but fail, if I scroll down the page a little, the message ‘Total must be more than 0’ appears, but I do not know where it comes from.

    • This reply was modified 5 months ago by damniano.
    • This reply was modified 5 months ago by damniano.
    Plugin Support TomStylemixThemes

    (@tomstylemixthemes)

    Hi @damniano
    Sorry for delay in my reply!

    Yes i had your calculator. I have again tested it but it worked fine. As a proof i will leave a link to the video record – https://share.zight.com/E0uQRO4P
    In my settings in Stripe i have only Secret and Public keys as you mentioned.
    If the calculator is working fine in one product but is not working in another products may be the issue is with products not with calculator. I would recommend to compare the products (working one with not working).

    Kind regards

    Thread Starter damniano

    (@damniano)

    Hi @tomstylemixthemes

    Have you tried taking the product on its own, without any additional options?

    Watch my video. When I take the product on its own, it doesn’t work, but when I add the option, it’s fine.

    https://drive.google.com/file/d/1oTh5ohylR5Zfeem9BvwzvNW1xi8rvM4X/view?usp=sharing

    (this is a webm format – if it does not work, you can open it in Chrome)

    What is Total in your calculator?

    <span data-v-8c7a28fd="" class="calc-notice-title">Total must be more then 0</span>

    This might help me find the problem – perhaps it is something related to conditions or a formula?

    I have the impression that the calculator generates an error when you select a product that has VALUE set to less than 1.5.

    But I don’t know what ‘Total’ means and I can’t check it.

    Although all calculations seem to be performed and the value is > 0, something seems to ‘freeze’…

    Plugin Support TomStylemixThemes

    (@tomstylemixthemes)

    Hi @damniano

    As you can see in my screen record i did all steps at once. I assume that you are not using the calculator which i sent you. Because in my calculator all totals (formulas) are visible, in yours they are different from mine.

    If you have not the calculator which i corrected the issue and sent you please let me know i will try to re-send you it.

    Total is formula that is assigned as the amount of what calculator is calculating. The price which will be paid by customer.
    The span of the total will not solve your issue.

    The error in your formula meaning that you had written some kind of negative calculation into your formula. For e.g. -100 is the summary. The calculator cannot get such price from customer. So that it is triggering error.

    Hope the explanation was useful!

    Kind regards

    Thread Starter damniano

    (@damniano)

    Hi @tomstylemixthemes

    Because in my calculator all totals (formulas) are visible, in yours they are different from mine.

    I think I used your file, but I just added a hidden class to the formulas because the client doesn’t need to see all the calculations.

    If you can send me the file again, I’ll check it once more.

    What else I did: I added the “required” option to the first fields, because I think there is a problem when only the product is selected and nothing else is checked. But adding, for example, the quantity or finish seems to solve this problem. However, if you use the default settings, an error appears saying that total = 0.

    https://limewire.com/d/kCcPO#P9DbCGh6bm – Here is my current calculator, because I had to make some other changes at the customer’s request.

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

You must be logged in to reply to this topic.