Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Autocomplete problem


AndyG

Recommended Posts

Hi,

 

I've just installed OSC and implemented a template, however I don't know if this is an issue with the default OSC install or if its something I've messed up. On the customer login page the password is visible it isn't **** out, and the autocomplete feature in IE stores the password aswell as the CC no. on the checkout payment page.

 

Can anyone give me some advice on how to fix this issue?

 

Thanks..

 

Andy.

Link to comment
Share on other sites

Hi, thanks for the reply.

 

I've managed to fix the prob by adding

 

<input type="password"

 

Just before

 

<?php echo tep_draw_password_field('password'); ?></TD>

 

in login.php

 

all seems to work fine now :D

 

I've still got to install a CC module, so I'm hoping that will reosolve the other issue.

 

Andy.

Link to comment
Share on other sites

The CC module is installed but the CC field on the checkout page is still allowing the autocomplete feature in IE to store the CC no. I know this can be turned off in IE, but it should be coded within the page in my opinion.

 

In a normal HTML form you can just add <input autocomplete="off"> but my php knowledge is very limited, I've been looking at this for hours and got nowhere, I hope someone can help me with this.

 

Thanks.

Link to comment
Share on other sites

Figured this one out myself aswell, just thought I'd post it incase any one else has a similar issue.

 

In includes\functions\html_output.php

 

About line 164

 

I changed

// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
   $field = '<input type=" class="rollover"' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
     $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
   } elseif (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

 

to

// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
   $field = '<input type=" class="rollover" autocomplete="off"' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
     $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
   } elseif (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

Link to comment
Share on other sites

  • 2 years later...

I'm facing this same autocomplete problem right now. It looks like your code would work, but would disable autocomplete on all input fields... guess its worth it to protect the CC, but would like to only apply this to that one field if we could find a way!

 

Drew

Link to comment
Share on other sites

  • 7 months later...
I'm facing this same autocomplete problem right now. It looks like your code would work, but would disable autocomplete on all input fields... guess its worth it to protect the CC, but would like to only apply this to that one field if we could find a way!

 

Drew

 

This can be fixed without disabling autocomplete everywhere by editing catalog/includes/modules/payment/cc.php. In function selection() change the line

 

'field' => tep_draw_input_field('cc_number')),

 

to

 

'field' => tep_draw_input_field('cc_number','',' autocomplete="off"')),

 

This assumes you're using the standard credit card module. I assume you'd need to make a similar change in the other modules you use.

 

Does anyone know how to fix the same problem with the PayPal module though. The code doesn't appear to be written in the same way and I can't figure it out.

 

Cameron

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...