• Resolved shawtky

    (@shawtky)


    Hello,

    I need 10% discount on price when customer increase quantity.

    This is my custom formula bot not quite works: (({quantity}>10)?(({product_price}-({product_price}*0.21))):{product_price})

    If you see link to page. Product have price 10€
    When quantity is set to 2 price_value should be 9 and total 19€.

    When quantity is set to 3 price value should be 8 and total 27€

    can you help me out? Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter shawtky

    (@shawtky)

    I meant this formula: (({quantity}>1)?((0.9*({product_price}*{quantity}))):0)

    Hi,

    I have created a demo product for you on our official site.

    Here is the link to the example product page: https://wcpa.demo.acowebs.com/product/formula/

    The link to the form: https://wcpa.demo.acowebs.com/wp-admin/post.php?post=5440&action=edit

    We have used the formula as (({quantity}>=2)?0.9*{product_price}:0)
    The quantity will already be multiplied with the product price. So no need to include it in the formula. That is why I used a shorter formula than yours.
    I hope this may solve your issue.
    Thank you.

    Thread Starter shawtky

    (@shawtky)

    Thank you it is working only when quantity is 2. When quantity is 3 product price should be 8, q= 4 -> price = 7…..

    Sorry, we can’t understand logic behind this formula. If you could share the normal mathematical formula to find these prices, we can convert that into our system of formula calculation.

    And writing formula continuously to the end of it is not a good method in coding. So please share the normal formula for finding these price values. We may able to help you.

    Thank you.

    As we haven’t heard back from you further, we assume that this issue has been resolved at your end and considering this ticket as closed. Please don’t hesitate to get back to us if you require any further assistance or clarifications from our end in the future. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom formula : 10% discount on price when quantity increase’ is closed to new replies.