Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fast easy checkout


nana

Recommended Posts

Hi Frank,

Tried your test site.

 

Didn't create an account but added something to my shopping cart after registering. Then I logged off.

I got the message:

You have been logged off your account. It is now safe to leave the computer.

 

Your shopping cart has been saved, the items inside it will be restored whenever you log back into your account.

 

I think that needs changing.

Link to comment
Share on other sites

  • Replies 1.7k
  • Created
  • Last Reply

Top Posters In This Topic

a lot of little things to think of i do not think it is that hard to fix. on the other hand probably there is no session in logoff maybe just adding a little note to the english file like if you have created an account your shopping cart would be saved.....or maybe put something in the logoff

link just thinking out loud

i will comeup with something

Edited by nana
Link to comment
Share on other sites

here is my header navigation if someone is intrested
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <a href="<?php  if (!tep_session_is_registered('createaccount')) {echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; } else {echo tep_href_link('account_password_new.php', '', 'SSL'); ?>" class="headerNavigation"><?php echo 'Create Account'; }  ?></a>  |  <?php } else { ?><a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT, 'fromlogin=1', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;
?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>  </tr>
</table>

hello mark

as far as your problem let me ask you a couple of questions

is the confirmation code present in the email

make sure that in checkout process you have the code to update the password of the customer to the random value generated

i am using this random password as a validator so the customer that recives the email is the only one that can change the password and create an account in account_password_new.php

also make sure that the confirmation password is in the url

it is a good idea to use the most recent one of this file because i also added the ability to add an account before nonaccounts logout

 

 

Hi Frank

 

Thanks for your prompt reply.

 

Im using the lastest contribution of 25th sept.

Confirmation code is present in email

i think i have the correct code for random value generator

confirmation password is in url

 

 

also updated Db to reflect as radder says about all customers account create=Y

 

any ideas?

 

regards

 

mark

Link to comment
Share on other sites

I get when I enter a valid login and password.

 

1054 - Unknown column 'createaccount' in 'where clause'

 

select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from customers where customers_email_address = '[email protected]'AND createaccount='Y'

Link to comment
Share on other sites

I get when I enter a valid login and password.

 

1054 - Unknown column 'createaccount' in 'where clause'

 

select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from customers where customers_email_address = '[email protected]'AND createaccount='Y'

 

you need to update your database using the following SQL Statement

 

ALTER TABLE `customers` ADD `createaccount` CHAR( 1 ) DEFAULT 'Y' NOT NULL ;

Link to comment
Share on other sites

glad it is working for you david and thanks for the help i will look at that instruction o see what i can do

otto

can you try your create_account3.phphere is yours

see if you can reproduce the errors

also i have cleaned up the file since you used yours. have you made any other changes other than removing the right column

 

Hi. Frank. Yes, I can reproduce the errors with create_account7.php. I get an empty zip code field that will no longer accept and a drop down menu with either Alabama or California selected depending on what I typed in in the State field.

 

Besides removing the right column, I'm using the following contributions:

Paypal Website Payments Pro contribution (http://www.postosc.com)

Dynamic MoPics v.3.000

htmlarea

Fixed Width Site Template (basically puts a <div> around the site body)

Link to comment
Share on other sites

Ok. So I just replaced my page with your create_account3.php and it appears to work now.

 

The only differences are:

 

On your page it says:

NOTE: If you already have an account with us, please login at the login page.

whereas on mine it says:

PRIMARY_ADDRESS_DESCRIPTION

 

Also, Zip Code should come below the State. Actually, this is a change that I did make on mine (without really knowing what I'm doing) which I suspect might have caused the problems. I would also like to hide Newsletter.

 

Thanks! I'm getting close.

Link to comment
Share on other sites

Ok. So I just replaced my page with your create_account3.php and it appears to work now.

 

The only differences are:

 

On your page it says:

NOTE: If you already have an account with us, please login at the login page.

whereas on mine it says:

PRIMARY_ADDRESS_DESCRIPTION

 

Also, Zip Code should come below the State. Actually, this is a change that I did make on mine (without really knowing what I'm doing) which I suspect might have caused the problems. I would also like to hide Newsletter.

 

Thanks! I'm getting close.

 

 

you can define your PRIMARY_ADDRESS_DESCRIPTION in english.php

 

mark

Link to comment
Share on other sites

otto

to move the zip code or any other field you have to move the hole block of code

 <tr>
			<td class="infoBoxContents"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('shippostcode'); ?></td>
		  </tr>

and put it where you want it notice that each block is within a

<tr></tr?

in your case you better put it right before

<tr>
			<td class="infoBoxContents"><?php echo ENTRY_COUNTRY; ?></td>
			<td class="infoBoxContents"><?php echo tep_get_country_list('shipcountry') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
   <tr>

Link to comment
Share on other sites

Frank, I've already tried that, but that only puts the zip code field of the shipping address after the state field but not in the billing address area. Which part deals with the info displayed in the billing address? Thanks.

Link to comment
Share on other sites

sophia there seems to be a problem with my logic in account_password_new.php

problem is that as of now if you put a link in the SHOP for the non_accounts to register anytime after they made a purchase other than email it does not work

AS FAR AS IN THE EMAIL I

i changed everything before

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

to

<?php
/*
 $Id: account_password_new.php,v 1.1 2003/05/19 19:55:45 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 // needs to be included earlier to set the success message in the messageStack
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_PASSWORD);

if (($HTTP_GET_VARS['customers_id']) || ($HTTP_POST_VARS['customers_id'])) {
  if ($HTTP_GET_VARS['customers_id']){ $customers_id = $HTTP_GET_VARS['customers_id'];}
  if ($HTTP_POST_VARS['customers_id']) {$customers_id = $HTTP_POST_VARS['customers_id'];}
  } else{
  if (tep_session_is_registered('customer_id')){$customers_id=$HTTP_SESSION_VARS['customer_id'];
  } 
  }

 if (($HTTP_GET_VARS['confirmation_password']) || ($HTTP_POST_VARS['confirmation_password'])) {
  if ($HTTP_GET_VARS['confirmation_password']){ $password_current = $HTTP_GET_VARS['confirmation_password'];}
  if ($HTTP_POST_VARS['confirmation_password']) {$password_current = $HTTP_POST_VARS['confirmation_password'];}
 }else{
  if (tep_session_is_registered('customer_id')) $password_current=TEMP_PASSWORD;
  if (!tep_session_is_registered('customer_id'))$password_current = tep_db_prepare_input($HTTP_POST_VARS['password_current']);
}

and this should work for email

unfortunatly i can not test this it seems that there is a problem with email on my server. i have sent a support request and hoping that the issue will be reolved so i can test these changes

the older account_password_new.php from version 1.5 used to work and so should this changes with email

the problem i am having with logic is that after customer makes a purchase his temp password changes and i can not think of a way to carry it back to account_password_new.php.

maybe i can put it in the session but right now since i can not test it is a problem

 

otto try this

 <tr>
			<td class="infoBoxContents"><?php echo ENTRY_POST_CODE; ?></td>
			<td class="infoBoxContents"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
		  </tr>

after

	  <?php

 if (ACCOUNT_STATE == 'true') {
?>
		  <tr>
			<td class="infoBoxContents"><?php echo ENTRY_STATE; ?></td>
			<td class="infoBoxContents">
<?php
if ($HTTP_POST_VARS['action'] == 'process') {
  if ($entry_state_has_zones == true) {
	$zones_array = array();
	$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
	while ($zones_values = tep_db_fetch_array($zones_query)) {
	  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
	}
	echo tep_draw_pull_down_menu('state', $zones_array);
  } else {
	echo tep_draw_input_field('state');
  }
} else {
  echo tep_draw_input_field('state');
}

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;
?>
			</td>
		  </tr>
<?php
 }
?>

Link to comment
Share on other sites

sophia

the fix for create account from email link works i just tested it

nut the problem remains that if there is a link for the customer in the shop to create an account if he had a non account it will not work after he makes a purchase.

after the purchase he can only upgrade the account from email

i will tackle this tommorow

otto

let me know if you got this working for you

Link to comment
Share on other sites

sophia is trying to use it with sts and has it working

as far as bts post either create_account or chevkout_shipping template or htm part so i take a look

sophia and david i think i resolved the other two issues but i have to test it first a bit

Link to comment
Share on other sites

sophia

the fix for create account from email link works i just tested it

nut the problem remains that if there is a link for the customer in the shop to create an account if he had a non account it will not work after he makes a purchase.

after the purchase he can only upgrade the account from email

i will tackle this tommorow

otto

let me know if you got this working for you

 

 

Hi Frank

 

your solution wored, thanks fo your help on this one - great contribution.

 

 

Mark

Link to comment
Share on other sites

Hi Frank,

Tried your test site.

 

Didn't create an account but added something to my shopping cart after registering. Then I logged off.

I got the message:

 

I think that needs changing.

i have a simple solution for this

in catalog/logoff

right after

require('includes/application_top.php');

add

if (tep_session_is_registered('createaccount')) $show_me=1;

and change

   <tr>
			<td class="main"><?php echo TEXT_MAIN;?></td>
		  </tr>

to

   <tr>
			<td class="main"><?php if ($show_me!=1) {echo TEXT_MAIN;
} else {echo TEXT_MAIN_NO_ACCOUNT;}?></td>
		  </tr>

in your includes/languages/english/logoff.php add this before closing?>

define('TEXT_MAIN_NO_ACCOUNT', 'You have been logged off your account. It is now safe to leave the computer.<br><br>');

you can change the language defenition as you please

Link to comment
Share on other sites

Thanks Frank,

That works.

I haven't had any customer feedback yet but I do notice that over half of our orders since I installed this seem to be without account (despite the potential savings to regular customers of having an account), so we must be doing something right here!

Link to comment
Share on other sites

david

thanks for the feedback i know most people do not feel they want to add an account they feel it obligates them or we use it to spam them or or or... although they give the same info any way lol

also there is a small bug and that is that non-customer can not create an account from a link within the store after he has made a purchase.

i will resolve this issue today and i think this will be done.

which paypal version you are using i want to take a look at his instruction file.

Link to comment
Share on other sites

Hi Frank,

I'm using 3.1.5

I didn't do the modifications quite as I had posted but tried to get as close as possible to your idea of what should be done.

I thought that I had done them correctly but I still see links to the account history when customers haven't created accounts. I must say that I never know what I can and cannot do when using classes so I'm keeping my fingers crossed that I don't break anything! It makes it worse that the changes have to be done within a function, so working out just what variables are available to the function adds more complexity (for me).

 

I didn't really do any testing on the 3.1.5 - just plugged in and tried it, but it seems to work. I must say it seemed to have virtually no programs or database tables in common with the version I had been running before (which was either 1.0 or 1.5)

Link to comment
Share on other sites

david please post any link that you see to any account since they have to be removed.

as a precaution i had a line added to the top of all acount files to redirect to a create an account for non accounts

after

  if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

add

//fast easy checkout start
if ((tep_session_is_registered('customer_id'))&&(tep_session_is_registered('createaccount'))) {  $navigation->set_snapshot();
tep_redirect(tep_href_link('account_password_new.php', '', 'SSL'));
 }
//fast easy checkout end

this will redirect the non accounts to account_password_new.php

i have not implemented this in the demo shop but on account.php but it is a good idea.

also by accident i saw an occurance of what you were talking about in regard to shipping address missing

i added a few lined to create_account.php

this should prevent that from happenning

after

   $cart->restore_contents();

add

 $shipping_address_query = tep_db_query("select address_book_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "'");
$shipping_address = tep_db_fetch_array($shipping_address_query);

 $billto = $shipping_address['address_book_id'];
 $sendto = $shipping_address['address_book_id'];
tep_session_register('billto');
tep_session_register('sendto');
 $billto = $shipping_address['address_book_id'];
 $sendto = $shipping_address['address_book_id'];
  // restore cart contents

Link to comment
Share on other sites

Hi Frank,

 

The link I was talking about from the Paypal contribution was in the order confirmation email. Sorry I didn't make this clear. It is still sending the regular email even to non-account customers. I am going to take a closer look. Probably the account variable isn't available to the function.

 

Thanks for the shipping address fix. I'll give that a try.

Edited by radders
Link to comment
Share on other sites

i will take a look at what i have done and see if i can clean up my file and post it my actuall store is modified too much it is a version of hobzilla mall system that was banned and from there i have made changes to have only one set of files and pass all the info for the stores to move into session

and blah blah blah

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