Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2007
    Posts
    4
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Calling Functions

    Might want to have a peek in the Downloads section for the Cart Summary mod. I bet it contains what you need.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jan 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Calling Functions

    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

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Calling Functions

    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2007
    Posts
    4
    Plugin Contributions
    0

    Default 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

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Calling Functions - cart total in header

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

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jan 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Calling Functions - cart total in header

    Please forgive a tired and wiery young man 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 .

    Chris

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Calling Functions - cart total in header

    No worries - glad you got it working.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Header error of shopping cart total
    By TTZZ in forum General Questions
    Replies: 4
    Last Post: 29 May 2014, 04:43 PM
  2. calling the order total on checkout success , also coupons
    By electricshoe in forum General Questions
    Replies: 10
    Last Post: 26 Jan 2013, 02:11 AM
  3. Calling the Link functions?
    By philip937 in forum General Questions
    Replies: 6
    Last Post: 21 Jan 2013, 02:37 PM
  4. Calling admin defined functions from catalog files?
    By yellow1912 in forum Contribution-Writing Guidelines
    Replies: 3
    Last Post: 21 Aug 2007, 05:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg