OK thank you, I will take a look in a bit, have a few things i have to take care of tonight, but should be a quick css class definition....
OK thank you, I will take a look in a bit, have a few things i have to take care of tonight, but should be a quick css class definition....
Dan, quick FYI, when you click on your logo you get taken to lulu.com.... don't know if that is by design or what...
Onto the issue @ hand...
when I enter an incorrect cc # after I press continue it is highlighted in red... when I enter a real cc # with incorrect exp and security code, it doesn't display an error at all... What payment module are you using...?
Dan,
I'm sorry, you are absolutely right, it is indeed up there...
OK, in your code below it looks like you copy and pasted what was displayed. You will need to locate the file that produces this text. Around the text make a div with a created class....<div class="ccDecline">Your credit card was declined. Please try another card or contact your bank for more info.</div>
Once you create that div in that file, open you includes/templates/yourtemplate/css/ stylesheet.css file and add the following the end of the document:
This should do it.....ccDecline {
background-color:#FF0000;
font-weight: bold;
}
The trouble will be finding the document that produces the message. It will likely be in a variable. So look up that string in your admin panel. Lookup admin>tools>developers toolkit
in the last field type 4-5 words from the string, (Your credit card was declined) will work. In the dropdown next to it select catalog. Your results searching for the page this string is in will be displayed. sift through there to find the page that produces this string. Add the div above, and your set :)
Neither attemp worked... when I try and modify the file that has the _DECLINED_ message in any way, it produces a blank page during checkout.:
****FROM THE: languages/english/modules/payment/
<?php
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_TITLE', 'Gateway Services (Credit Card)');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_PUBLIC_TITLE', 'Credit Card');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_DESCRIPTION', '<strong>Gateway Services Credit Card Module</strong><br><br>Credit Card Test Info:<br>CC Number: 4111111111111111<br>CC Expiry: Any valid expiration');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_CREDIT_CARD_OWNER', 'Credit Card Owner:');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_CREDIT_CARD_EXPIRES', 'Credit Card Expiry Date:');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_JS_CC_OWNER', '* The owner\'s name of the credit card must be at least ' . CC_OWNER_MIN_LENGTH . ' characters.\n');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_JS_CC_NUMBER', '* The credit card number must be at least ' . CC_NUMBER_MIN_LENGTH . ' characters.\n');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_JS_CSC', '* The credit card security code must be 3 characters (4 for American Express).\n');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR_CSC', 'The credit card security code must be 3 characters (4 for American Express).');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR_MESSAGE', 'There has been an error processing your credit card. Please try again.');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_DECLINED_MESSAGE', 'Your credit card was declined. Please try another card or contact your bank for more info.');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR', 'Credit Card Error!');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_CARD_SECURITY_CODE', 'Credit Card Security Code:');
define('MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_CSC_DESCRIPTION', '(located on the back of the credit card)');
?>
---This is the entire page for the .php document. The weird thing is that if it is a wrong # entered for the credit card an error message is in the middle of the page with red background? The error message at the top only comes up when the "...credit card has been declined....."
****here is some .php from where the error message is generated in the : /modules/payment/
function before_process() {
if ($_GET['response'] == '1') return;
if ($_GET['response'] == '2') {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_DECLINED_MESSAGE), 'SSL', true, false));
}
// Code 3 is an error - but anything else is an error too (IMHO)
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR_MESSAGE), 'SSL', true, false));
}
function after_process() {
return false;
}
function get_error() {
$error = array('title' => MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_ERROR,
'error' => stripslashes(urldecode($_GET['error'])));
return $error;
}
function check() {
global $db;
if (!isset($this->_check)) {
$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_GATEWAY_SERVICES_CC_STATUS'");
$this->_check = $check_query->RecordCount();
}
return $this->_check;
}
I suspect your payment module wasn't written for the version of Zen Cart that you're using.
The current version of Zen Cart doesn't rely on the &error_message= parameter to display payment messages.
It would instead be written something like this:GET[response]==3 would be done similarly.Code:if ($_GET['response'] == '2') { $messageStack->add_session('checkout_payment', MODULE_PAYMENT_GATEWAY_SERVICES_CC_TEXT_DECLINED_MESSAGE, 'error'); zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false)); }
.
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.
So I tried it just as you wrote it for the message stack, and it gave me a blank page during checkout... any other ideas?
A blank page means you've created a PHP syntax error, either by directly editing a file incorrectly, or required files are not found.
There is a debug logging utility in step 2a of this FAQ article dealing with Blank Pages: https://www.zen-cart.com/tutorials/index.php?article=82
.
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.