It is a bit more complicated than this as I am trying to avoid too much overhead.
The code field holds 3 diff variables for the 3 diff plan types.
$licenses_p with discount options updates based on int field cb_lic_qty_p
$licenses_c1 with 20 discount options updates based on int field cb_lic_qty_c1
$licenses_c2 with more than 50 discount options updates based on int field cb_lic_qty_c2
The int fields are shown based on conditionals and all are connected in one code field.
Now this code field is passing its value to the promotion.
The issue is that if the int field is not updated the discount passed to the invoice will be based on the last kept value of the int field.
Using substitution in the promotion and combine all the above would be almost impossible.
Why do you need it to update the licenses field before subscribing?
Because the user must pay the correct amount based on Options that calculates price based on the amount of licenses chosen by the user
Option1 -> 2 -> +100%
Option2 -> 3 -> +200% and so on
Then based on the above I need somehow to calculate the right discount.
So there is no way to somehow update the int field upon option selection, right?