Installing the H4H Affiliates Module

September 9th, 2010 by Ken

I helped a friend install the H4h Affiliates module on his OS Commerce store after he ran into an issue where loading his site would return errors for missing files. The installation instructions were pretty good except for one step where the author provides an incorrect step.

The step where you have to add the following lines to your catalog/includes/configure.php

// H4H AFFILIATE PROGRAM
if (isset($Module) && $Module == 'Affiliate') {
define('DIR_WS_INCLUDES', '../includes/');
} else {
define('DIR_WS_INCLUDES', 'includes/');
}
// H4H AFFILIATE PROGRAM

The problem is, the author tells you to add these to the end of your configure.php file when you should actually be replacing your existing DIR_WS_INCLUDES definition line.

The issue with what is in the instructions is that you cannot redefine something that’s been defined already. So by placing the code at the end of the configure file, nothing actually happens so the path is then completely wrong when the affiliates code is run.

Posted in PHP | No Comments »

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.