Title: Product Price
Last modified: April 23, 2024

---

# Product Price

 *  Resolved [saulestrive](https://wordpress.org/support/users/saulestrive/)
 * (@saulestrive)
 * [2 years ago](https://wordpress.org/support/topic/roi-builder/)
 * Hello,
 * I have been having problems with the **else if** function. It only takes three
   of the values provided with it.
 * This is the formula I am using (when D is the amount of customers) to determine
   the product price
 * IF( D <=10000 AND D >0 ) {599}
   ELSE IF( D >10000 AND D <=25000) { 1199 }
 * ELSE IF ( D >25000 AND D <=10000) { 1799 }
 * ELSE IF ( D > 10000 AND D <=20000) { 2399 }
 * ELSE IF ( D > 20000 AND D <=50000)
   {2999}
 * However, the only values that get displayed are 599, 1199 and 2999. (even if 
   the amount of customers correlate to the other two prices)
 * What is going wrong?
 * Sincerely,
 * Saule Daniulaityte
    -  This topic was modified 2 years ago by [saulestrive](https://wordpress.org/support/users/saulestrive/).

Viewing 1 replies (of 1 total)

 *  [Lisa StylemixThemes](https://wordpress.org/support/users/lisastylemixthemes/)
 * (@lisastylemixthemes)
 * [2 years ago](https://wordpress.org/support/topic/roi-builder/#post-17709374)
 * Hello [@saulestrive](https://wordpress.org/support/users/saulestrive/)
 * The problem lies in the third condition: `ELSE IF ( D >25000 AND D <=10000)`.
   This condition is always false because no number can be greater than 25,000 and
   less than or equal to 10,000 simultaneously.
 * Here’s how to fix the formula:
    1. **Remove the incorrect condition:** Delete the third condition entirely:
 *     ```wp-block-code
       ELSE IF ( D >25000 AND D <=10000) { 1799 }
       ```
   
    2. **Re-order the conditions (optional):** While not strictly necessary for functionality
       in this case, it can improve readability to order the conditions from least 
       to greatest number of customers:
 *     ```wp-block-code
       ELSE IF( D > 20000 AND D <=50000) {2999}
       ELSE IF( D > 10000 AND D <=25000) { 1199 }
       ```
   
 * With these changes, the formula should correctly evaluate the number of customers(
   D) and assign the corresponding product price.
 * Have a nice day!
 * Lisa

Viewing 1 replies (of 1 total)

The topic ‘Product Price’ is closed to new replies.

 * ![](https://ps.w.org/cost-calculator-builder/assets/icon-256x256.png?rev=3525305)
 * [Cost Calculator Builder](https://wordpress.org/plugins/cost-calculator-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cost-calculator-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cost-calculator-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/cost-calculator-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cost-calculator-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cost-calculator-builder/reviews/)

## Tags

 * [else if](https://wordpress.org/support/topic-tag/else-if/)
 * [price](https://wordpress.org/support/topic-tag/price/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lisa StylemixThemes](https://wordpress.org/support/users/lisastylemixthemes/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/roi-builder/#post-17709374)
 * Status: resolved