E-Junkie Forum http://www.e-junkie.com/bb/ E-Junkie Forum RSS en-us Copyright 2012, 19.5 Degrees. All rights reserved. webmaster@e-junkie.com webmaster@e-junkie.com Tue, 16 Aug 2011 02:52:32 GMT Fri, 10 Feb 2012 18:43:21 GMT 681 E-JUNKIE 5 E-Junkie Forum http://www.e-junkie.com/bb/ http://www.e-junkie.com/ej/logo.gif 290 104 Post #27 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Tue, 16 Aug 2011 02:52:32 GMT E-junkie Discussions; E-junkieGuru Post #26 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Fri, 12 Aug 2011 05:00:00 GMT E-junkie Discussions; bunkbedking Post #25 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Tue, 9 Aug 2011 01:25:54 GMT
items=EJEJC_cartsize();

Thus, your version of the code should look like this:

<script type="text/javascript">
<!--
function EJEJC_lc(th) { return false;}
function EJEJC_config() {
EJEJC_POSTCALL=true;
EJEJC_OPACITY = 30;
EJEJC_HEIGHT = 500;
EJEJC_WIDTH = 750;
EJEJC_BRDRCOLOR = "#00f";
EJEJC_CDAYS = 61;
}
function EJEJC_shown() {
jQuery("#state1").attr("innerHTML", "Enter <b>SHIPPING ZIP CODE</b>");
items=EJEJC_cartsize();
if (items== null) {items = 0};
jQuery("#itemsInCart").attr("innerHTML",
items+" Items<BR/>$"+EJEJC_cartamt().toFixed(2)+" total");
}
// -->
</script>]]>
E-junkie Discussions; E-junkieGuru
Post #24 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Mon, 8 Aug 2011 21:52:01 GMT
see

http://bunkbedking.com/more-bunk-beds-rustic

- no mini cart - but code is as above

What am I doing wrong?

also, do you have a link to a web site where it is working so I can see it in action?]]>
E-junkie Discussions; bunkbedking
Post #23 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Mon, 8 Aug 2011 20:46:08 GMT
<script type="text/javascript">
<!--
function EJEJC_lc(th) { return false;}
function EJEJC_config() {
EJEJC_POSTCALL=true;
EJEJC_OPACITY = 30;
EJEJC_HEIGHT = 500;
EJEJC_WIDTH = 750;
EJEJC_BRDRCOLOR = "#00f";
EJEJC_CDAYS = 61;
}
function EJEJC_shown() {
jQuery("#state1").attr("innerHTML", "Enter <b>SHIPPING ZIP CODE<\/b>");
if (items== null) {items = 0};
jQuery("#itemsInCart").attr("innerHTML",
items+" Items<BR/>$"+EJEJC_cartamt().toFixed(2)+" total");
}
// -->
</script>

Then just place this in your page wherever you want the minicart to appear:

<div id="itemsInCart"></div>]]>
E-junkie Discussions; E-junkieGuru
Post #22 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Sat, 6 Aug 2011 22:11:11 GMT
I have this code

<script type="text/javascript">
<!--
function EJEJC_lc(th) { return false;}
function EJEJC_config() {
EJEJC_POSTCALL=true;
EJEJC_OPACITY = 30;
EJEJC_HEIGHT = 500;
EJEJC_WIDTH = 750;
EJEJC_BRDRCOLOR = "#00f";
EJEJC_CDAYS = 61;
}
function EJEJC_shown() {
jQuery("#state1").attr("innerHTML", "Enter <b>SHIPPING ZIP CODE<\/b>");
}
// -->
</script>

not sure how to integrate the mini card code ?]]>
E-junkie Discussions; bunkbedking
Post #21 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Tue, 26 Jul 2011 21:11:00 GMT
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.]]>
E-junkie Discussions; E-junkieGuru
Post #20 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 4 May 2011 22:05:57 GMT http://www.e-junkie.com/ej/developer-directory.htm]]> E-junkie Discussions; E-junkieGuru Post #19 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 4 May 2011 20:50:31 GMT how to automatically initialize the mini cart on page load...
too bad my javascript knowledge ends exactly there :(]]>
E-junkie Discussions; robibert
Post #18 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Sun, 20 Feb 2011 23:24:07 GMT E-junkie Discussions; E-junkieGuru Post #17 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Sat, 19 Feb 2011 03:26:37 GMT E-junkieGuruIf you're handy with JavaScript, our Lead Developer says you can use the functions EJEJC_cartsize(); and EJEJC_cartamt(); at will, to get the number of items and the cart total respectively. The amount currently does not reflect discounts but that'll be fixed shortly.

can you check with you DEV guy as those functions quoted are returning errors and only available after EJEJC_shown has been run - has he got example code?

thanks

Jez]]>
E-junkie Discussions; Jezd
Post #16 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 29 Dec 2010 00:58:05 GMT
function EJEJC_config() { EJEJC_POSTCALL=true; }
function EJEJC_shown() {
items=EJEJC_cartsize();
if (items== null) {items = 0};
document.getElementById('itemsInCart').innerHTML=items+" Items <BR/>£"+EJEJC_cartamt().toFixed(2)+" total";
}

This gets rid of null value and helps currency format, results of an emply cart :-

0 Items
£0.00 total

Still struggling to get html values on initial page load.

Jez]]>
E-junkie Discussions; Jezd
Post #15 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Fri, 10 Dec 2010 02:49:43 GMT E-junkie Discussions; E-junkieGuru Post #14 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 8 Dec 2010 20:56:08 GMT
I am sure there must be a method for doing this.

Cheers

Jez

E-junkieGuruI did say it was an unofficial hack. :^)

I don't know of any way to display the itemsInCart div contents automatically before the cart is rendered, but I might guess there could be some way to do that with JavaScript?

I'll assign this to the attention of our Lead Developer, in case he has a solution to offer.
]]>
E-junkie Discussions; Jezd
Post #13 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 20 Jan 2010 22:26:50 GMT E-junkie Discussions; nobo Post #12 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 20 Jan 2010 06:21:15 GMT
Any help would be greatly appreciated.]]>
E-junkie Discussions; blacklabel
Post #11 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 24 Jun 2009 22:13:58 GMT E-junkie Discussions; nobo Post #10 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 24 Jun 2009 22:03:02 GMT E-junkie Discussions; E-junkieGuru Post #9 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 24 Jun 2009 21:43:25 GMT I'm using a fat.free.cart and it's working fine itself. When adding your hack minicart shows always $0
thank you
nobo]]>
E-junkie Discussions; nobo
Post #8 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 http://www.e-junkie.com/bb/topic/3086/pg/1#post18583 Wed, 24 Jun 2009 21:22:51 GMT E-junkie Discussions; E-junkieGuru