Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter start1988

    (@start1988)

    Wait, nevermind, I found the answer in https://ww.wp.xz.cn/support/topic/add-amount-field?replies=2.

    Thanks!

    Thread Starter start1988

    (@start1988)

    Thank you for the responses. Turns out like both of you suggested, it was a js file that contained code that were using html class as hooks, replacing the values.

    For those who want to see what it looks like, here it is:

    var $mLevel = $('.membership-level');
    	$mLevel.find('select').change(function() {
    		if($('#new_member_2:checked').length > 0) {
    			var $opt = $(this).find(':selected');
    			$('.payment').toggle($opt.attr('showpayment') == 'true');
    		}
    
    		var $opt = $($mLevel.find('option:selected'));
    
    		var cost = parseFloat($opt.attr('costexgst'));
    		var gst = cost * 0.1;
    
    		$mLevel.find('table.amounts').toggle(cost > 0);
    
    		$mLevel.find('span.membershipLevelName').text($opt.attr('membershiplevel'));
    		$mLevel.find('span.annualFee').text('$ ' + cost.formatMoney(2, '.', ','));
    		$mLevel.find('span.gst').text('$ ' + gst.formatMoney(2, '.', ','));
    		$mLevel.find('span.total').text('$ ' + (gst + cost).formatMoney(2, '.', ','));
    	}).change();

    The second to last line contains the code that targets span with total class and replace it with a total dollar value.

    Thank you

    Thread Starter start1988

    (@start1988)

Viewing 3 replies - 1 through 3 (of 3 total)