Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jul 2005
    Posts
    33
    Plugin Contributions
    0

    Default Fatal error in credit_cards.php

    This is a strange one! When I put something in my cart and try to checkout (from a ZenCart installation v1.3.0.2 on www.skeptic.org.uk/shop) I get the following error:

    Fatal error: Call to a member function on a non-object in [zen cart installation]/includes/languages/english/credit_cards.php on line 57

    The strange thing is, I consistently see the error when I do this from a particular location (work) but when I tried to reproduce the problem at home it worked perfectly. This is completely reproducible, not intermittent.

    Even more interesting, if I connect from work via a proxy the problem disappears. So it's not simply a problem with the software on my work PC (Win2k, IE6 SP1), nor with the time of day or cookies. It seems it must be a speed or firewall issue.

  2. #2
    Join Date
    Jul 2005
    Posts
    33
    Plugin Contributions
    0

    Default Re: Fatal error in credit_cards.php

    More information:

    I installed Firefox and tried that and the problem disappeared. So I tried clearing the cache in IE6 and that made no difference. But clearing cookies in IE6 DID apparently fix the problem. So it appears it was a cookie problem after all (maybe I should change the title of this thread?).

    So, the question is, how was the bad cookie created, and why wasn't the error recoverable? Sadly I don't think I can recover the offending cookie now but if the problem recurs I will post it.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error in credit_cards.php

    1. What addons/contributions do you have installed?
    2. It's likely referring to the $template object, which is not (normally) set based on anything cookie-related, unless you have some sort of multi-template-handling addon etc installed.
    .

    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.

  4. #4
    Join Date
    Jul 2005
    Posts
    33
    Plugin Contributions
    0

    Default Re: Fatal error in credit_cards.php

    I don't have any template handling addons installed. The template I use is copied from "classic", with only minor modifications, most notably the charset is changed to utf-8, the width changed to 100%, the colour changed to blue and metric units (kg instead of lbs) used throughout.

    I've also modified the e-mail templates to remove links to graphics (because they get blocked by mail clients such as Outlook) but I don't think they're involved in any way here.

    The only addon module I have installed is "order_total", for applying discounts based on the total number of items in the cart. I don't think that would have been invoked yet at this stage of the checkout process.

    I wonder if the bad cookie was an old one left over from a previous version of Zen Cart? I don't normally access the cart from work so it's possible the cookie was quite old.

  5. #5
    Join Date
    Jul 2005
    Posts
    33
    Plugin Contributions
    0

    bug Re: Fatal error in credit_cards.php

    The error is back! And this time none of the solutions I mentioned above work. Help!

    (It's happening consistently on three different installations)

    The line that produces the error is:
    define('IMAGE_CC_ENABLED_VISA', zen_image($template->get_template_dir('cc1.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'cc1.gif'));

  6. #6
    Join Date
    Jul 2005
    Posts
    33
    Plugin Contributions
    0

    bug Re: Fatal error in credit_cards.php

    Update - after clearing ALL cookies in BOTH IE6 and Firefox the problem went away again. Hmm.

  7. #7
    Join Date
    Jul 2007
    Location
    West Aussie Land
    Posts
    5
    Plugin Contributions
    0

    Default Re: Fatal error in credit_cards.php

    I'm getting the same error intermittantly, with the credit_cards.php file listed in the error message. It's not just happening to me, its also happening to a large number of customers. Is there a fix for this, or any idea's on why its happening?

    Quite disheartened as I love the zen cart, however, I can't use it if my customers can't access the site.

    Of those customers that I know are trying to access the site, I'd say close on 50% of them are unable to and it's not one single network causing the problem, as they are all connecting from various countries. (Previously worked for an ISP so checked that.)

    Clearing cookies and cache does solve the problem, however, those that are visiting from a search engine link, I can't tell them that, they believe the site is down, and continue on their way.

    the site can be found at http://www.timerealms.net/thyme4you

    running ver 1.3.7

    I've checked the other thread, with the sessions.php fix in it, and this is already present in the code.

  8. #8
    Join Date
    Jan 2007
    Posts
    236
    Plugin Contributions
    0

    Default Re: Fatal error in credit_cards.php

    if there is another file calling another template then what can be done?

    Fatal error: Call to a member function get_template_dir() on a non-object

  9. #9
    Join Date
    Feb 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Fatal error in credit_cards.php

    Hello there.
    I just installed the portuguese language pack, and when i choose the portuguese language in the dropdown menu in admin pannel, i get this same error:
    Fatal error: Call to a member function get_template_dir() on a non-object in (...)/admin/includes/languages/portugues/credit_cards.php on line 46

    The file is there, both in the /admin/includes/languages/portugues and includes/languages/portugues. Any help?

    Ps: I can work in the admin panel with no problems in english, but is annoying...

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error in credit_cards.php

    The admin language files should not include a credit_cards.php file, nor any code that tries to load it.
    The credit_cards.php file is for the store-front only.
    .

    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.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v154 PHP Fatal error Call-time pass-by-reference - tpl_yahootreemenu.php
    By RubenZ in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 6 Feb 2015, 05:24 PM
  2. v150 PHP Fatal error: Out of memory in includes/modules/attributes.php
    By donnyb in forum General Questions
    Replies: 0
    Last Post: 6 Apr 2012, 12:15 AM
  3. Replies: 3
    Last Post: 7 Jan 2010, 12:31 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR