PDA

View Full Version : Items in cart and value


jmedinger
19-Feb-2003, 01:19 PM
I'm trying to include the javascript that shows the items in the users cart and their value however I want it to be displayed OUTSIDE the NETQUOTEVAR:FORMBEGIN and NETQUOTEVAR:FORMEND tags of the page.

Is this possible? At the moment, the code doesn't display anything if it is not withn the main actinic generated body of the page.

Cheers

Jos

Darren B
19-Feb-2003, 02:58 PM
I could not tell you - but i would like to know because that is where mine is sitting and i need a little bit more flexibility.

sorry for tagging on to this but when someone posts a reply i will get to know too

Cheers
Darren ;)

cdicken
20-Feb-2003, 07:36 AM
Hmm...

If you look at any of the Clean Layouts, you will see that the

<script language="JavaScript">
document.write("NETQUOTEVAR:CARTCOOKIEITEMS&nbsp;" + getCartItem(3)+"&nbsp;<BR>");
document.write("NETQUOTEVAR:CARTCOOKIEVALUE&nbsp;" + getCartItem(1));
</script>

code is always outside the FORMBEGIN and FORMEND tags and works fine.

Strange - do you have a page I can look at to try and figure out what is going on?

jmedinger
20-Feb-2003, 12:20 PM
Chris if you go to (and please excuse the 'ann summers' type content - it's for a customer!)

http://www.sextoys4me.co.uk/test/acatalog/

That will take you to the main page and any of the 4 main actinic generated sections in the middle of the page will take you to the catalog

It's obvious where the javascript we're interested in is located

If you want to see the Act_Primary file, I've also put that on the server on

http://www.sextoys4me.co.uk/test/Act_Primary.html

Cheers

Jos

cdicken
21-Feb-2003, 07:44 AM
Your problem is that somehow the lines:

<SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>

have been removed form the Primary template. Please put these lines into the <HEAD> area of your template - above all your custom script functions.

This code is what allows the cart-content JavaScript to work.

jmedinger
21-Feb-2003, 09:04 AM
Chris,

Thanks very much for resolving this... I was going quietly spare about it (and the client wasn't too happy either!)

All is working now

Thanks again

Cheers

Jos