Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment Module Broken!


deftonez4me

Recommended Posts

Hi all.. I'm working on an OS/Commerce site that has an inoperable payment module. The first thing that i did was go into the admin section, under Administrator->Modules->Payment, to see what module was installed and none show up, but when i pressed the install button to install a new payment module nothing happened.

 

Any Ideas? :'(

Link to comment
Share on other sites

I noticed that the alignment with the Install button is all screwy too, which might be related to the problem. Here's what i'm seeing:

Did you do a "view source" yet? There might be an error message not visible in the page but visible in the HTML source of the page. Also, where the HTML ends is often a good indication where the code hit an error and quit.

 

Try to find a PHP error log for your site too if the hosting provider turned error echo'ing to the browser off (for good reasons).

Link to comment
Share on other sites

Hi deftonez4me and everyone,

 

I am having the same problem......did you managed to get it solved?

 

How to get the payment modules working......anybody......help really appreciated urgently.

 

Thanks in advance

What version of osc are you running?

 

See: http://www.oscommerce.com/forums/index.php?showtopic=283185

 

If it is 'osCommerce 2.2-MS2', thae patch from last year (2006) introduced a bug. See the thread above.

Link to comment
Share on other sites

I am running OS/Commerce Version 2.2-MS2, indeed. After a thorough comparison with a file compare and merge utility, i have confirmed that indeed both update patches are installed. I am now noticing that the problem is larger in scope than i thought:

On the Admin->Modules page, not only am i not able to install any modules, but i now noticed that the header title is wrong and says "Newsletter Manager".

 

scrsht1.jpg

 

So i got the i got the idea to go to the real "Newsletter Manager" under Admin->Tools->Newsletter Manager and its all screwed up too!!

 

scrsht2.jpg

 

I've confirmed that its not an issue with the a patch bug, so are there any other suggestions out there?

 

Thanks in Advance.

Link to comment
Share on other sites

I am running OS/Commerce Version 2.2-MS2, indeed. After a thorough comparison with a file compare and merge utility, i have confirmed that indeed both update patches are installed.

Confusing...

I've confirmed that its not an issue with the a patch bug, so are there any other suggestions out there?

What happens when you click on Payment in the left column?

Link to comment
Share on other sites

The only thing that changes when i click on the Payment, Shipping, or Order Total links in the left column, is the where it outputs "Module Directory: /includes/modules/payment/". It will change to say either ""Module Directory: /includes/modules/shipping/", or "Module Directory: /includes/modules/shipping_total/" , depending on which corresponding link you click on in the left column.

Link to comment
Share on other sites

The only thing that changes when i click on the Payment, Shipping, or Order Total links in the left column, is the where it outputs "Module Directory: /includes/modules/payment/". It will change to say either ""Module Directory: /includes/modules/shipping/", or "Module Directory: /includes/modules/shipping_total/" , depending on which corresponding link you click on in the left column.

Why don't you start with editing modules.php, from the brace on line 39 and add some default settings. So it should now read (the changed part starts at else { // in case set is not a GET variable):

	  case 'payment':
  default:
	$module_type = 'payment';
	$module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
	$module_key = 'MODULE_PAYMENT_INSTALLED';
	define('HEADING_TITLE', HEADING_TITLE_MODULES_PAYMENT);
	break;
}
 }  else { // in case set is not a GET variable
	$module_type = 'payment';
	$module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
	$module_key = 'MODULE_PAYMENT_INSTALLED';
	define('HEADING_TITLE', HEADING_TITLE_MODULES_PAYMENT);
 }

Link to comment
Share on other sites

Still nothing!!! I echoed the $set variable, to see if its getting the proper values, each time i click on a link in the left column, and it is. The case statement is working properly so adding the else statement is ineffective.

What is the value of $PHP_SELF ?

Link to comment
Share on other sites

I've confirmed that its not an issue with the a patch bug, so are there any other suggestions out there?

 

Thanks in Advance.

So you have fixed the The Magic Quotes compatibility layer?

Link to comment
Share on other sites

So you have fixed the The Magic Quotes compatibility layer?

 

 

 

I'm not sure what you mean. I checked the thread that you posted earlier:

 

In that thread you said: "The versions before MS2 are not compatible with MS2, which is the main version is use. Between MS2 and RC1, there were two patch updates. There isn't a version number for those patches (in the files) so you have to compare file content to see if they are installed. First, download the patches from here. Extract the contents and compare a few of the files with those in your shop. If your shop has them installed, then you probably have the latest MS2 version."

 

I verified that i was running version MS2, so i downloaded both those patches, and compared the files in the patches, to the files on my server, to confirm that both patched were installed, and they already were. Is that what you were talking about when you mentioned the Magic Quotes Compatibility Layer fix?

Link to comment
Share on other sites

I'm not sure what you mean. I checked the thread that you posted earlier:

 

In that thread you said: "The versions before MS2 are not compatible with MS2, which is the main version is use. Between MS2 and RC1, there were two patch updates. There isn't a version number for those patches (in the files) so you have to compare file content to see if they are installed. First, download the patches from here. Extract the contents and compare a few of the files with those in your shop. If your shop has them installed, then you probably have the latest MS2 version."

 

I verified that i was running version MS2, so i downloaded both those patches, and compared the files in the patches, to the files on my server, to confirm that both patched were installed, and they already were. Is that what you were talking about when you mentioned the Magic Quotes Compatibility Layer fix?

catalog/includes/functions/compatibility.php:

 

// Ie, products attributes

function do_magic_quotes_gpc(&$ar) {

if (!is_array($ar)) return false;

 

while (list($key, $value) = each($ar)) {

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

} else {

$ar[$key] = addslashes($value);

}

}

reset($ar); // Bug in Patch osc-060817 corrected

}

 

admin/includes/functions/compatibility.php:

 

// Ie, products attributes

function do_magic_quotes_gpc(&$ar) {

if (!is_array($ar)) return false;

 

while (list($key, $value) = each($ar)) {

if (is_array($value)) {

do_magic_quotes_gpc($value);

} else {

$ar[$key] = addslashes($value);

}

}

reset($ar); // Bug in Patch osc-060817 corrected

}

Link to comment
Share on other sites

/admin/modules.php

Is the directory catalog/includes/modules/payment (or any other subdirectory on that level) readable for the server?

 

On line 117 it says:

  if ($dir = @dir($module_directory)) {

Why don't your remove the @ before dir and see if there is an error:

  if ($dir = dir($module_directory)) {

Edited by Jan Zonjee
Link to comment
Share on other sites

I am having the exact same issue. None of the modules are showing up - just an install button which does nothing. Were you able to solve the problem?? Help would be appreciated.

And have you tried the suggestion in the post before yours? You can try things yourself you know...

Link to comment
Share on other sites

I get an error message when I try that suggestion. Warning: dir(DIR_FS_CATALOG_MODULESpayment/) [function.dir]: failed to open dir: No such file or directory.

Then it looks like the error is due to a problem with your admin/includes/configure.php. There the define for DIR_FS_CATALOG_MODULES can be found:

  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

As you can see that define is not recognized.

Link to comment
Share on other sites

This is what my config file says (part of it anyway). I have only a limited knowledge of php. Is there a line there that I can change or modify to make it work? I don't have the line of code that you quoted above. Is that the problem. I pasted the line in, but that didn't work either.

 

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_ADMIN', '/admin/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

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...