Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CVV Help Popup - viaklix gateway


Guest

Recommended Posts

Well, we've got the viaklix gateway working great. However, we are having one little problem that I haven't found a fix for through searching the forums.

 

Basically, the problem is that next to the CVV field, there is a help link that should open a popup window. When we click on the link, we get a javascript "error on page" error. The code that should open the popup is in the viaklix.php file:

 

array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CVV_NUMBER. ' ' .'<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_CVV, '', 'SSL') . '\')">' . TEXT_CVV_LINK . '</a>',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'field' => tep_draw_input_field('viaklix_cvv_number')),

 

I suspect (from reading similar issues here in the forums) that there may be a problem with the name of the javascript function. However, I can't find where the javascript function "popupWindow" is defined. Anyone got a clue which file I should be looking in to find the function to see if the names match?

 

Thanks

Jeff Nelson

Edited by oldchevy
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

i followed the logic that was used in the options as images contribution (thank you!) to enable the help popup,

this may seem like a long explication, but i'll try to describe every step that i took!

if you follow these steps, you will end up with a functional (but pretty basic looking) popup showing the help text. a few little adjustments with the style and you should be ready to go!

so, without further ado, here's what i did...

 

1. in the catalog directory, create a new file for the help information (i called mine viaklix_help.php)

the code i used for this file is as follows (it's not too long!):

<?php
  require('includes/application_top.php');
  $navigation->remove_current_page();
  require(DIR_WS_LANGUAGES . $language . '/modules/payment/viaklix.php');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
	<div class="boxText" style="text-align:center;padding:5px;font-size:9pt;font-weight:bold;"><?php echo HEADING_CVV; ?></div>
	<div class="boxText" style="text-align:left;padding:5px;"><?php echo TEXT_CVV; ?></div>
	<div class="boxText" style="text-align:center;padding:5px;"><a href="java script:self.close()"><?php echo TEXT_CLOSE_WINDOW; ?></a></div>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

2. now open the file: catalog/includes/languages/english/modules/payment/viaklix.php

we'll need to add the name of the help file here.

for my viaklix_help.php file, i added the line:

define('FILENAME_POPUP_CVV', 'viaklix_help.php');

 

i also 'cleaned up' the html output defined for TEXT_CVV because it was missing the images, etc...

when i had finished the code looked like this:

 

define('TEXT_CVV', '<b>Visa, Mastercard, Discover 3 Digit Card Verification Number</b><br>
  For your safety and security, we require that you enter your card\'s verification number. The verification number is a 3-digit number printed on the back of your card. It appears after and to the right of your card number\'s last four digits.<hr>
	<b>American Express 4 Digit Card Verification Number</b><br>For your safety and security, we require that you enter your card\'s verification number. The American Express verification number is a 4-digit number printed on the front of your card. It appears after and to the right of your card number.');

 

3. lastly, the checkout_payment.php page needs the definition of the function popupWindow().

 

you should open the file catalog/checkout_payment.php

and paste the following javascript code inside the <script language="javascript"><!--

and the --></script> tags (i added mine at line 94)

 

function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}

 

and that should be it!

Link to comment
Share on other sites

  • 2 months later...
i followed the logic that was used in the options as images contribution (thank you!) to enable the help popup,

this may seem like a long explication, but i'll try to describe every step that i took!

if you follow these steps, you will end up with a functional (but pretty basic looking) popup showing the help text. a few little adjustments with the style and you should be ready to go!

so, without further ado, here's what i did...

 

1. in the catalog directory, create a new file for the help information (i called mine viaklix_help.php)

the code i used for this file is as follows (it's not too long!):

<?php
  require('includes/application_top.php');
  $navigation->remove_current_page();
  require(DIR_WS_LANGUAGES . $language . '/modules/payment/viaklix.php');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
	<div class="boxText" style="text-align:center;padding:5px;font-size:9pt;font-weight:bold;"><?php echo HEADING_CVV; ?></div>
	<div class="boxText" style="text-align:left;padding:5px;"><?php echo TEXT_CVV; ?></div>
	<div class="boxText" style="text-align:center;padding:5px;"><a href="java script:self.close()"><?php echo TEXT_CLOSE_WINDOW; ?></a></div>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

2. now open the file: catalog/includes/languages/english/modules/payment/viaklix.php

we'll need to add the name of the help file here.

for my viaklix_help.php file, i added the line:

define('FILENAME_POPUP_CVV', 'viaklix_help.php');

 

i also 'cleaned up' the html output defined for TEXT_CVV because it was missing the images, etc...

when i had finished the code looked like this:

 

define('TEXT_CVV', '<b>Visa, Mastercard, Discover 3 Digit Card Verification Number</b><br>
  For your safety and security, we require that you enter your card\'s verification number. The verification number is a 3-digit number printed on the back of your card. It appears after and to the right of your card number\'s last four digits.<hr>
	<b>American Express 4 Digit Card Verification Number</b><br>For your safety and security, we require that you enter your card\'s verification number. The American Express verification number is a 4-digit number printed on the front of your card. It appears after and to the right of your card number.');

 

3. lastly, the checkout_payment.php page needs the definition of the function popupWindow().

 

you should open the file catalog/checkout_payment.php

and paste the following javascript code inside the <script language="javascript"><!--

and the --></script> tags (i added mine at line 94)

 

function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}

 

and that should be it!

 

 

I'm still gettintg the error message, can you post the whole javascript part? Thanks Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...