Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 72601

Re: Java script "If the TOTAL price is lower than 65, it should automatically add 15"

$
0
0

OK, so it looks like you want the shipping fee field to be either 0 or 15, based on the Device Order Price field. If that's correct, the custom calculation script for the shipping fee field could be:

 

// Get the value of the Device Order Price field, as a number

var price = +getField("DeviceOrderPrice").value;

 

// Set this field value based on the TOTAL

event.value = price < 65 ? 15 : 0;

 

 

but you'd replace "DeviceOrderPrice" with the actual name of the field.

 

You final Total field would then simply be the sum of the two previous fields. Be sure to set any calculated fields to read-only.


Viewing all articles
Browse latest Browse all 72601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>