$licenses = (int) '[cb_licenses]';
if ( $licenses >= 10 ) {
return 10;
}
if ( $licenses >= 3 ) {
return 5;
}
return 0;
Please Log in to join the conversation.
Please Log in to join the conversation.
$licenses = (int) '[cb_licenses]';
if ( $licenses >= 10 ) {
return -10; // Increase price by 10%
}
if ( $licenses >= 3 ) {
return -5; // Increase price by 5%
}
return 0; // No price change
Please Log in to join the conversation.
Please Log in to join the conversation.
$licenses = (int) '[cb_licenses]';
if ( $licenses = 1 ) {
return 'no price change';
}
if ( $licenses = 2 ) {
return -100; // Increase price by 100%
}
if ( $licenses = 3 ) {
return -200; // Increase price by 200%
}
return 0; // No price change
Please Log in to join the conversation.
That parameter doesn't increase the price, but just limits how many users they can share with.All work fine except that the price of the plan does not increase according to the int userfield. It only applies the discount.
In integrations->Family plans I have set as Limit the int userfield. To my understaning the number of shared users does not increase the price, so how can I make this do so?
cb_licenses can't directly increase the price, no. You need to use a CB Code Field as provided above to calculate the price increase based off the value of cb_licenses. This can even just be simple multiplying math as shown below.EDIT: Sorry, it seems that you have already answered this above. So I suppose I will use the int userfield to increase the price of the plan. That means that there is no option to multiply the number of users by the plan price, correct?
$licenses = (int) '[cb_licenses]';
if ( ( ! $licenses ) || ( $licenses === 1 ) ) {
return 0; // No price change
}
return -( ( $licenses - 1 ) * 100 ); // Increase price by 100% per additional license
$licenses = (int) '[cb_licenses]';
if ( $licenses === 1 ) {
return 0; // No price change
}
if ( $licenses === 2 ) {
return -100; // Increase price by 100%
}
if ( $licenses === 3 ) {
return -200; // Increase price by 200%
}
return 0; // No price change
Please Log in to join the conversation.