Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Calling Functions - cart total in header

Calling Functions - cart total in header

Locked

Views: 1,051

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
27 Jan 2007, 10:35 PM
#1
chriz avatar

chriz

New Zenner

Join Date:
Jan 2007
Posts:
4
Plugin Contributions:
0

Calling Functions - cart total in header

To all @ zen forums,

Ive just started developing with zen cart and find it a real lifesaver for customising every last detail so first off thanks guys and keep up the good work.

Now i'd like to ask how its posisble to call the function/class to show the total amount of the cart ie £45.00 in the header tpl. I've checked the shopping cart side box and all pages related and just cant work it out.

function show_total() or something?

Any help much appreciated

Cheers,
Chris

27 Jan 2007, 11:24 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: Calling Functions - cart total in header

Might want to have a peek in the Downloads section for the Cart Summary mod. I bet it contains what you need.

27 Jan 2007, 11:35 PM
#3
chriz avatar

chriz

New Zenner

Join Date:
Jan 2007
Posts:
4
Plugin Contributions:
0

Re: Calling Functions - cart total in header

Thanks Kim your a star,

Can i call a function using just a single line of code or does zen cart prevent this due to security features?

Cheers,
Chris

28 Jan 2007, 8:10 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Calling Functions - cart total in header

There is no built-in facility for accessing Zen Cart data from outside Zen Cart.

You can do it with various custom coding approaches, but that requires an advanced understanding of the code and lots of time on your hands.

28 Jan 2007, 5:45 PM
#5
chriz avatar

chriz

New Zenner

Join Date:
Jan 2007
Posts:
4
Plugin Contributions:
0

Re: Calling Functions - cart total in header

Thanks Doc,

So how does the shopping cart sidebox display the total £? Is there not a way of taking the code from that and putting it into the header?

Cheers,
Chris

28 Jan 2007, 6:28 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Calling Functions - cart total in header

That's what the contribution Kim mentioned does for you.

29 Jan 2007, 1:01 AM
#7
chriz avatar

chriz

New Zenner

Join Date:
Jan 2007
Posts:
4
Plugin Contributions:
0

Re: Calling Functions - cart total in header

Please forgive a tired and wiery young man :dontgetit My code was producing a unexpected $end error after trying to implement the module so I assumed it wasnt working.

<?php } ?> fixed it.

Thanks People :cool: .

Chris

29 Jan 2007, 4:40 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Calling Functions - cart total in header

No worries - glad you got it working.