Is there anyone that could help me with the Wix
coding on a calculator?
I am having issues with it calculating. Any help with be greatly appreciated.
Here's a sample of the page I have created.
export function SG1Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#SG1Per’ ). text );
let selectedSG1Pur = Number ( event . target . value );
$w ( ‘#SG1R’ ). text = String ( selectedSG1Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text )
- Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function SG3Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#SG3Per’ ). text );
let selectedSG3Pur = Number ( event . target . value );
$w ( ‘#SG3R’ ). text = String ( selectedSG3Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function SG5Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#SG5Per’ ). text );
let selectedSG5Pur = Number ( event . target . value );
$w ( ‘#SG5R’ ). text = String ( selectedSG5Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function A35Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#A35Per’ ). text );
let selectedA35Pur = Number ( event . target . value );
$w ( ‘#A35R’ ). text = String ( selectedA35Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function I5Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#I5Per’ ). text );
let selectedI5Pur = Number ( event . target . value );
$w ( ‘#I5R’ ). text = String ( selectedI5Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function BG12Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#BG12Per’ ). text );
let selectedBG12Pur = Number ( event . target . value );
$w ( ‘#BG12R’ ). text = String ( selectedBG12Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function W6Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#W6Per’ ). text );
let selectedW6Pur = Number ( event . target . value );
$w ( ‘#W6R’ ). text = String ( selectedW6Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function FP10Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#FP10Per’ ). text );
let selectedFP10Pur = Number ( event . target . value );
$w ( ‘#FP10R’ ). text = String ( selectedFP10Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}
export function PR25Pur_change ( event , $w ) {
let price = Number ( $w ( ‘#PR25Per’ ). text );
let selectedPR25Pur = Number ( event . target . value );
$w ( ‘#PR25R’ ). text = String ( selectedPR25Pur * price );
$w ( ‘#TotalRewards’ ). text = String ( Number ( $w ( ‘#SG1R’ ). text ) + Number ( $w ( ‘#SG3R’ ). text ) + Number ( $w ( ‘#SG5R’ ). text ) - Number ( $w ( ‘#A35R’ ). text ) + Number ( $w ( ‘#I5R’ ). text ) + Number ( $w ( ‘#BG12R’ ). text ) + Number ( $w ( ‘#W6R’ ). text )
- Number ( $w ( ‘#FP10R’ ). text ) + Number ( $w ( ‘#PR25R’ ). text ));
}