To Start I am using Developer V7.
I am building a wholesale site that requires login. All prices are the same regardless of account. All the prices are set up as retail prices, no bulk prices or adjustments etc.
What I want to do in my ProductLIne Template is customize to show
MSRP
Your Price
Your Profit
what I thought was take the cost of the item from Actinic NETQUOTEVAR:PRODUCTPRICE and multiply it by 2 to get MSRP. I then wanted to subtract "MRSP" from "Your Price" to get "Your Profit"
I pieced together some code I found in the community:
the equation works in View Offline Preview in Actinic but not when I upload.
Any suggestions?
I am building a wholesale site that requires login. All prices are the same regardless of account. All the prices are set up as retail prices, no bulk prices or adjustments etc.
What I want to do in my ProductLIne Template is customize to show
MSRP
Your Price
Your Profit
what I thought was take the cost of the item from Actinic NETQUOTEVAR:PRODUCTPRICE and multiply it by 2 to get MSRP. I then wanted to subtract "MRSP" from "Your Price" to get "Your Profit"
I pieced together some code I found in the community:
Code:
<script type="text/javascript">
var price = 'NETQUOTEVAR:PRODUCTPRICE';
var cost = 0;
price = price.replace(/,/g,""); // remove all commas
price = price.replace(/./g,"."); // restore decimal point
price = price.replace(/£|$/g,"£"); // fix £ and $ to just £ (so we can fiddle with it later)
var pbits = price.match(/(£\d+\.\d\d)/); // now look for first £n.nn
if ( pbits != null )
{
cost = pbits[1].replace(/£/,"") - 0;
// now remove that £ and make numeric<br>
}
//var num= cost;
var cost2= cost * 2;
var result = cost2.toFixed(2);
document.write('$' + result);
//-->
</script>
the equation works in View Offline Preview in Actinic but not when I upload.
Any suggestions?
Comment