• Resolved shawtky

    (@shawtky)


    Hello,

    I need seperate pricing if quantity is more than 10. I used number field and write this custom product formula: ({value}>10?{product_price}-{product_price}*0.31:{value}*{product_price})

    value = quantity

    so what it does is that if quantity is more than 10, then it calculate 31% discount on product. I need to multiply this number * value. I tried this: ({value}>10?{product_price}-{product_price}*0.31 * value :{value}*{product_price}) but don’t work. I also tried this ({value}>10? ({product_price}-{product_price}*0.31) * value :{value}*{product_price})

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    We have created an example form for you on our demo site.

    Product page link: https://wcpa.demo.acowebs.com/product/formula-on-quantity/

    Form link: https://wcpa.demo.acowebs.com/wp-admin/post.php?post=5171&action=edit
    U: demo
    P: demo

    Hope this one will help you to achieve your requirement.

    Thank you.

    Thread Starter shawtky

    (@shawtky)

    thank you it’s working. There is one problem. This formula adds 22% fee. For example I have product price 10€(that is with fee included) but plugin add addition 22% fee. So Total price is then 12.2€

    example: hhttps://zastave.eu/produkt/jadro-xl/

    Hi,

    Please check the previous example now. We have made some tweaks in the formula and form.
    It may solve the issue.

    Thank you.

    Thread Starter shawtky

    (@shawtky)

    on your example is working great, but on my page is not. Is that because I have old version of plugin? My version is 3.4.6. My license expired 3 months ago. It works great if I click add to basket and check basket. But on product page total is not showing right.

    Hi,

    Could you please update the plugin and check it once more? It may because of the older version you are using.

    Thread Starter shawtky

    (@shawtky)

    I updated plugin but there was still same problem. I found there is a bug if you import product without taxes and then chose in woocomerce setting that you imported products without tax. I manage to fix the problem by enabling option display prices in store without tax.
    So now is working fine.

    Thread Starter shawtky

    (@shawtky)

    I have just one request. It is possible to display total price both with tax and without tax?

    Thread Starter shawtky

    (@shawtky)

    and also I am trying to add difrent discount for quantity more than 20. I added this to existing function but don’t work: (({quantity}>10)?(({product_price}-({product_price}*0.21)):{product_price}:({quantity}>20)?(({product_price}-({product_price}*0.31))):{product_price}) can you help me out?

    Thread Starter shawtky

    (@shawtky)

    ignore last reply, I no longer needs this formula

    Hi,

    We hope that the issue with the custom formula has solved.

    And to show the product price with and without tax is not possible.
    We are considering this ticket is solved as per your last reply and if it is not solved you can reopen this.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘formula for pricing by quantity’ is closed to new replies.