Hi there,



I'm currently building a Wordpress site for a Music Video Production Company.



They want to implement a 'build to order' technique used at websites such as Apple.



I've managed to get some JS to calculate the price, I was just wondering if I could use FFC along with this final price.



<script type=text/javascript>

function getTotal(){

var form=document.theForm;

var inputs=form.getElementsByTagName('input');

var length=inputs.length;

var total='2000';



for(i=0;i<length-1;i++){

if(inputs[i].type=='radio'){

var checked=inputs[i].checked?1:0;

if(checked){

var value=inputs[i].value.split("~~")[0];

total-=-value;

}

}

}

document.getElementById('totalspan').innerHTML="Total price will be: £"+total

total='0';

}



</script>





Thanks.



Berian

  • created

    Oct '11
  • last reply

    Oct '11
  • 1

    reply

  • 1.1k

    views

  • 2

    users

  • 4

    links

You can use the &amount= URL parameter to append an arbitrary price to the Add to Cart button's href= or action= URL, like so:



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=XXXXXX&cl=YYYYYY&ejc=2&amount=12.34" target="ejejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="http://www.e-junkie.com/ej/ejadd_to_cart.gif" border="0" alt="Add to Cart"/></a>



Note that the amount specified that way for an Add to Cart button would be ADDED to the product's base price set in Seller Admin; for a Buy Now button, it would REPLACE the item's base price. This and related tips you may find helpful are documented here:

http://www.e-junkie.com/ej/help.custom.purchase-buttons.htm#custom