• Resolved digialityco

    (@digialityco)


    I am attempting to set up the following formula:

    Length A * Length B * Finishing Style

    Finishing style can be either 0.0275 or 0.0375

    I am using conditional logic as follows:
    Lenght A * Length B * Finishing Style < 60
    = 60

    You’ll see if the cost is less than $60, it needs to be a $60 minimum. When I use “less than” < it turns into < and results this error:

    Total Unexpected character “;” around position 47 for expression side_a_length*side_b_length*finishing_style < 60.

    Is my formula syntax incorrect or is there a way to stop < from turning into < ?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Krzysztof Pi?tkowski

    (@wckalkulator)

    You are right. I fixed it in v.1.1.5.

    Thread Starter digialityco

    (@digialityco)

    Thanks, it’s working great!

    Thread Starter digialityco

    (@digialityco)

    I am now getting a ‘bad request’ response, but haven’t changed anything about the formula. Any thoughts?

    Staging here: https://staging3.digiality.co/product/get-your-quilt-on/

    Thread Starter digialityco

    (@digialityco)

    @wckalkulator
    I am now getting a ‘bad request’ response, but haven’t changed anything about the formula. Any thoughts?

    Staging here: https://staging3.digiality.co/product/get-your-quilt-on/

    Plugin Author Krzysztof Pi?tkowski

    (@wckalkulator)

    Hello, I’ve just got notification because you called me with “@”. Sorry for late reply.

    I’ve just uploaded v.1.2.3. The issue was in JS. I used selector $(“.summary form”).serialize(). You have no .summary wrapper around “form” tag. In v.1.2.3 I changed selector to $(“form.cart”).serialize() which fixed this issue.

    “Bad request” is thrown when:
    – nonce is invalid
    – there’s no _wck_hash and _wck_product_id in POST data
    In this case there was no _wck_hash and _wck_product_id in POST data because $(“.summary form”) was not found.

    Please call me @wckalkuator on next issues or create a new thread.

    Plugin Author Krzysztof Pi?tkowski

    (@wckalkulator)

    Fixed in v.1.2.3. My detailed answer has been held for moderation by automated system and will be manually reviewed by a moderator.
    @moderator – please delete this answer.

    Thread Starter digialityco

    (@digialityco)

    @wckalkulator Appreciate your quick responses and support. This does seem to be fixed now. My final question for you, is it possible to hide the error message if a user hasn’t chosen an option yet? Or can I change what it states?

    When a user hasn’t chosen an option, it states this as the total:
    Total Variable “finishing_style” is not valid around position 29 for expression side_a_length*side_b_length*finishing_style < 60.

    Plugin Author Krzysztof Pi?tkowski

    (@wckalkulator)

    Hello, error messages are for debug purposes and are showed only for admin or shop manager. General, any user with capability ‘manage_woocommerce’. Try to view product page as a guest. There’s no error message.

    This may be confusing, so I’m going to add simple setting to show error messages for admin.

    You can also check default selected option for radio options.

    Thread Starter digialityco

    (@digialityco)

    @wckalkulator Just viewed not logged in as admin. It’s great as is. Thank you!

    Plugin Author Krzysztof Pi?tkowski

    (@wckalkulator)

    @digialityco Please rate this plugin if you like it ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Conditional logic character error’ is closed to new replies.