Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

country state selector AND human confirmation V1.2


Recommended Posts

Hello everybody ! :)



I'm new to oscommerce. I have installed an MS2.2 version (local) and some contributions without any problems. Here come the first one..... :huh:


I'm trying to have country state selector AND the human confirmation V1.2 working together.... when I install one OR the other one, no problem, all work just fine.


My problem to make them work together is that I have to change the same lines in CREATE_ACCOUNT.PHP to make it work (lines 18~20 in the original file)


$process = false;
if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
  $process = true;


these lines must be replaced by :


$process = false;

// +Country-State Selector
$refresh = false;
if (isset($HTTP_POST_VARS['action']) && (($HTTP_POST_VARS['action'] == 'process') || ($HTTP_POST_VARS['action'] == 'update') ||
    ($HTTP_POST_VARS['action'] == 'refresh'))) {
  if ($HTTP_POST_VARS['action'] != 'refresh') { $process = true; } else { $refresh = true; }
// -Country-State Selector


to have country state selector to work OR by :


$process = false;

// BOF // Contrib: Human confirmation v1.2

$thecode_okay = false;
$process_okay = false;
$noautomationcode = $HTTP_SESSION_VARS["noautamationcode"];

// -> v1.1 // Changed to work w/ random image names
$img_dir  = $HTTP_SESSION_VARS["noautamationdir"];
$img_name = $HTTP_SESSION_VARS["noautamationname"];
// Find and delete old images
if (strlen($img_name) >= 6) {
  $dirHandle = dir($img_dir);
  while($fileHandle = $dirHandle->read()) {
    if (substr($fileHandle,0,strlen($img_name)) == $img_name)
// <- v1.1 // Changed to work w/ random image names

$thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));
$process_okay = (isset($HTTP_POST_VARS['action'])  && ($HTTP_POST_VARS['action'] == 'process'));

if ( ($process_okay == true) && ($thecode_okay == true) ) {
// EOF // Contrib: Human confirmation v1.2
 $process = true;


for human confirmation to work.


also, for this one, I have to cut this line :


<?php require('includes/form_check.js.php'); ?>


and paste it at the end of the file, just before :


<!-- body_text_eof //-->
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->


so...... as I'm really not so good with php, I have tried many things to make it work but without success.... everytime, I got the following error :


Parse error, unexpected $end on C:/...../catalog/create_account.php on line 692


....and this line is the php require one that I just moved.....



Has someone been able to make these two contributions work together ? Please, somebody help me on this one !!


PS : sorry for my bad english :lol:

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

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