Returns the id of the current product.

Syntax

$dummy = CFO_iDiscounts(price, quantity, quantity_steps, discount_steps);

price: Initial price configured in the product.
quantity: Is the value entered by customer.
quantity_steps: List of quantity sections (with tube “|” as separator).
discount_steps: List of discounts sections (with tube “|” as separator).
Each step in quantity_steps is compared with quantity in this way: (quantity<=quantity_step)

Examples

$dummy = CFO_iDiscounts(10, 125, "1|150|200", "0|15|30");
// It will use 15 as percentage so will return: 8.5
// internally will take the price (10) and calculate
// the result as = 10 - (10*15/100)
// because quantity 125 is lower than the second step 150, so
// it will use second discount value, 15.

$dummy = CFO_iDiscounts(1250, 105, "1|50|100", "0|10|20");
// It will use 20 as percentage because quantity (105)
// is greater that the last step (100) so will use the
// greater discount (20)
// the result wil be 1250 - (1250*20/100) = 1000

$dummy = CFO_iDiscounts(1250, 105, "1|50|100", "0|10|20|25");
// I will use 25 as discount
// discount_steps can have one more step than quantity_steps,
// if quantity is greater than last quantity_step, latest
// discount_step will be returned