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

    Default Change credit card error message at top of page

    When someone enters an incorrect credit card number durring checkout they are taken back to this page "https://www.store.com/index.php?main_page=checkout_payment&error_message=There+has+been+an+error+proce ssing+your+credit+card.+Please+try+again.15%2FNo+such+Issuer"

    Does anyone know how to change the appearance of this error message that is at the top of the page to make it more noticeable, example red background color? I don't see any css styles applied to this specific page area that I can change.

    Thanks in advance for your help.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change credit card error message at top of page

    That will be one of the "Message Stacks" in your css
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: Change credit card error message at top of page

    I have changed all the message stacks and none of the change that error message (at the absolute top of the page). I checked the source and it is displayed without at div or span tags. there is no way to style it without adding those tags.

    Which php file is it kept in? The reply seems to come from the payment gateway but there must be a solution to this.



    https://www.store.com/index.php?main...hgpfriqbblln63

    Code:
    <div id="mainWrapper">
    
     - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.
    
    <!--bof-header logo and navigation display-->
    
    <div id="headerWrapper">

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change credit card error message at top of page

    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: Change credit card error message at top of page

    thanks for your help. I did manage to locate where the error massage is saved.

    however whenever i add span tags (<span id="warning"></span>) within the php it crashes the entire cart. (500 error)

    is there a special way to add span tags? where is it safe to place it?


    Line #39 : define('MODULE_PAYMENT_DIRECTONE_TEXT_DECLINED_MESSAGE', 'Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.');


    Line #300 : zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $response_text . ' - ' . urlencode(MODULE_PAYMENT_DIRECTONE_TEXT_DECLINED_MESSAGE), 'SSL', true, false));


    thanks.
    Last edited by shaztesting; 11 Jun 2009 at 01:14 AM.

  6. #6
    Join Date
    Jun 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change credit card error message at top of page

    I am having the same difficulty in attempting to style the declined or error output of the payjunction module. I am wondering how the $messageStack works, do I need to declare it somewhere else. If someone could explain the syntax of $messageStack and add_session(what, what, what) it would really help. Or if someone knows of another payment module that is a good example of this that would be great also.


    } else if ($response['dc_response_code']) {
    $messageStack->add_session('checkout_payment',DONT KNOW WHAT TO PUT HERE , 'error');
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));

  7. #7
    Join Date
    Jun 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Change credit card error message at top of page

    Hey Shaztesting,

    After messing with this for a while I believe I have an option for you, kinda messy but I think I got it working.

    I went into tpl_header.php and found the code that outputs the error message. (the center "if" statement below)

    <?php
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    I cut that out of there and wrapped a div tag around it , called it "ccError" and then moved it to the very botttom of the tpl_header.php file, just above the closing php tag. See the code below.

    <div id="ccError">
    <?php
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    ?>
    </div><!--end cc error-->


    This way, when that error occurs, it displays below the header rather than at the top, and I can make it big and red. The drawback is that any other error that occurs will also appear with the same style, but I am going to try it for a while and see if it works allright.

    Ideally I would like to insert that error within the main page, but I am lost on how to incorporate it into the table layout at this point. Maybe one of the masters can let me know if this is BAD for a reason I have overlooked, but hopefully they are too busy testing the beta of version 2

  8. #8
    Join Date
    Mar 2009
    Posts
    57
    Plugin Contributions
    0

    Default Re: Change credit card error message at top of page

    hate to drag up an old thread, but this was never really answered. I have changed the css for messagestack yet it does not affect the size, colour etc for the error messages that display in the cart. Can someone please enlighten me as to where these error messages are getting styled. I've searched through the developers toolkit, to no avail, I can't find what files are affecting this style.

    I just want to change the Size fot he error message text.

    Thanks

    John

 

 

Similar Threads

  1. Phone/Fax Credit Card Details Error Message
    By Shopsite Novice in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 24 Apr 2011, 09:50 AM
  2. Credit Card charged, error message upon checkout
    By wllindsey524 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 21 Sep 2009, 10:38 PM
  3. Error Message for credit card authorization
    By Horsegirrl in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 27 Aug 2009, 06:44 PM
  4. error message when credit card module disabled
    By jilly1217 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 23 Nov 2006, 02:30 AM
  5. Credit Card Logos at top of page
    By Ousel in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 4 Sep 2006, 04:41 PM

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