Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    help question Friendly error page for users?

    I'm new to Zen-cart. Sorry if this is a FAQ although I don't see this covered in any FAQ. I have a stock config of Zen-cart 1.3.8 newly installed on a Windows server.

    Before getting things configured 100%, I noticed error messages presented to the user. Is there a way to send the ugly details to an admin and present a friendlier face to the user? To be specific:

    I had my email config incorrectly configured. After I created a test user account, zencart tried to send me the new-account-creation email. My browser presented a plain white page with the text: 'couldn't find /usr/bin/sendmail'. The error message is correct - no complaints there. My issue is that this is what was shown to the user and there is no other link or button to let them proceed - it's sort of a dead end. I'd prefer it if that message were sent to an admin (maybe even with some info about how the user got to that) and that the user was presented with a page that looked like my theme with an apology message and then a link/button to proceed. I understand that this won't happen again now that I have things properly set up but errors can and will happen unexpectedly.

    Hopefully I've missed some feature that already exists and just needs to be configured. Any thoughts?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Friendly error page for users?

    Well, two things occur to me in response to that.

    1. It behooves one to go through all of the store's functionality to make sure things are working, before opening to the public. This includes creating accounts, adding products, placing those products in the cart, and completing checkout with the payment gateway you intend to use. And then optionally refunding the transaction if it's appropriate.

    2. Email system error messages are enabled by default so that you, the shopowner, can see all those messages first-hand when they occur. You can disable that by switching the "Friendly Email Errors" option on in Admin->Configuration->Email Options if you so desire.


    As for a generic "sorry, we encountered an error" page, that's not a built-in option at this point.
    There is a general PHP-Error debug logging utility in the free addons area that can be used to collect PHP errors for the storeowner to review from time to time, which may be of some related value to 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.

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Friendly error page for users?

    Thanks for the quick reply. My thoughts:

    Re #1: I agree of course that thorough testing is required. That's how this came up. The store is not open to the public yet.

    Re #2: I'll make use of that config option but my comments were pointed more towards error handling in general. No matter how diligent one is, errors will happen. Spurious issues could occur or maybe a hosting provider makes a change without thinking it would affect you, etc.

    Again, thanks for response. I'll post this feature request on the appropriate forum section.

    Dave

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Friendly error page for users?

    Quote Originally Posted by DaveBurns View Post
    Re #2: I'll make use of that config option but my comments were pointed more towards error handling in general. No matter how diligent one is, errors will happen. Spurious issues could occur or maybe a hosting provider makes a change without thinking it would affect you, etc.

    Again, thanks for response. I'll post this feature request on the appropriate forum section.
    You're assuming rather a lot from a single error message. As DrByte said, email messages can be made more friendly. Other errors are suppressed by default (implemented as part of the 1.3.8 release) to stop them from being visible to customers, which is why the debug facility, also referred to by DrByte, is needed. So it's not clear what additional feature request you would be making.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Friendly error page for users?

    @kuroi -

    I don't think I'm making an assumption. DrByte said "As for a generic "sorry, we encountered an error" page, that's not a built-in option at this point." That's the feature I'd request.

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Friendly error page for users?

    Yes that makes sense. Far and away the most common errors arise because the cart's gotten goobered up. Misplaced apostrophes in the middle of language strings or missing files for example. These usually kick out errors that cause the PHP parser to fail completely, i.e. outside of Zen Cart. I wonder if there's a way to trap this and load a static error page. Technically this would be outside of Zen Cart, but practically might be nice to be bundled with it.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Jan 2007
    Location
    1.5 miles from Home
    Posts
    674
    Plugin Contributions
    0

    Default Re: Friendly error page for users?

    [quote=DaveBurns;706121
    The error message is correct - no complaints there. My issue is that this is what was shown to the user and there is no other link or button to let them proceed - it's sort of a dead end. I'd prefer it if that message were sent to an admin (maybe even with some info about how the user got to that) and that the user was presented with a page that looked like my theme with an apology message and then a link/button to proceed. I understand that this won't happen again now that I have things properly set up but errors can and will happen unexpectedly.

    Hopefully I've missed some feature that already exists and just needs to be configured. Any thoughts?[/quote]

    Build you own error pages.
    http://www.zen-cart.com/forum/showthread.php?t=78132

 

 

Similar Threads

  1. v150 how to create a custom form page for only registered users?
    By buhebutler in forum General Questions
    Replies: 6
    Last Post: 4 Apr 2013, 01:08 PM
  2. blank log in page for admin no log in for users
    By alfonso99 in forum Customization from the Admin
    Replies: 1
    Last Post: 30 Jul 2011, 10:34 AM
  3. change welcome page for registered users
    By thenax in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 20 Feb 2010, 12:20 PM
  4. Replies: 0
    Last Post: 3 Jan 2010, 12:44 AM
  5. different payment options for different users/groups of users
    By grossd in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 17 Feb 2008, 06:48 PM

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