Open bonucci opened 9 years ago
Coming in late but hope this will help somebody.. think there's plenty of examples here...
<input type="text" id="show-total" val="" />
<script>
simpleCart.ready(function(){
var total = simpleCart.total(); // grabs the total in a var
$("#show-total").val(total); // assign the total as the new input value
});
</script>
Edit Use below to get the grand total in cart...
<script>
simpleCart.ready(function(){
var grandTotal = simpleCart.grandTotal(); // grabs the grand total in a var
$("#show-total").val(grandTotal); // assign the grand total as the new input value
});
</script>
Does this part work for anyone else?
Hello there, im trying to display the total price in a input field, does anybody no how to do that?