We've got a slight improvement in the recommended syntax, incorporating Jezd's contribution and our cart's jQuery support:
function EJEJC_config() {
EJEJC_POSTCALL=true;
}
function EJEJC_shown() {
items=EJEJC_cartsize();
if (items== null) {items = 0};
jQuery("#itemsInCart").attr("innerHTML",
items+" Items<BR/>$"+EJEJC_cartamt().toFixed(2)+" total");
}
Then just place this in your page wherever you want the minicart to appear:
<div id="itemsInCart"></div>
Now, if anyone's worked out how to get that minicart DIV to display on page load, rather than only appearing after the main cart has been viewed, feel free to share the approach you devised here.