Hi people,
I have got a little further along.
My Aim
For telephone orders only.
A separate page acceessible only by us in the office behind htaccess which will accept the input of a postcode and return the email address associated with it (if any).
Then click a button to launch the login page with that email address already inserted in the field. (may add the master password too)
Because I had no better idea, I wanted the email address passed to the login page within the URL like "www.website.co.uk/zencart/index.php?main_page=login&[email protected]"
I had a problem with launching the login page with the email address already inserted and had to edit zencart/includes/templates/template_default/templates/tpl_login_default.php as follows :
Near the top, add
Code:
<?php
$var1 = $_GET["var1"];
?>
Find this
Code:
echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"' );
edit it to this
Code:
echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"' . 'value = ' . $var1 );
That launches the page with the email already in place. Cool!
I had to add an "if" to not add the address if there was none in the URL because otherwise it inserted a "/".
So, the question is, is this safe?
Can anyone see any reason not to do this ?
Would appreciate any feedback.
Thanks for reading.
Bookmarks