Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fast easy checkout


nana

Recommended Posts

Hi Frank,

 

Excellent!

It looks as if all the components are in place for a working quick checkout!

Turning back once more to look at the cosmetic side:

 

 

I think you still have the typo 'EXSISTING' in the program file (but not the language file).

 

 

I don't have the solution to the next two but I thought I should mention:

 

One thing that should be added is to prevent the 'Log off' and 'My Account' links being shown in checkout_success.php. None of the other pages were affected in my highly modified store, but on checkout_success I could go into my non-existent account.

 

What I wondered about also was the 'notifications' part of the page, as again you can't really notify them of product upates if they checked out without an account. A similar thing applies to the newsletter subscription. on create_account.

 

How are these handled in the regular PWA contribution? I haven't used it in years because it never used to delete the customer email addresses and that causes major problems for ages!

Link to comment
Share on other sites

  • Replies 1.7k
  • Created
  • Last Reply

Top Posters In This Topic

that shouldn't be so hard i can either do a check in application_top.php or add the info to session

i don't see the typo but i will look furthur

how about giving them a second chance to make an account in check_out success

Link to comment
Share on other sites

ok i found the misspelling i will fix it in the nest update

now to fix the other issue

in create_account.php around line 230 add this line

if  ($createaccount == 'N')  tep_session_register('createaccount');

before

// restore cart contents
     $cart->restore_contents();

in includes/header.php around line 64 change

<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>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <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>
 

to

<td align="right" class="headerNavigation"><?php if ((tep_session_is_registered('customer_id'))&&(!tep_session_is_registered('createaccount'))) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></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>
 

and something like that for the account icon

and in checkout_success.php around line 80 change

<?php

 if ($global['global_product_notifications'] != '1') {
   echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

   $products_displayed = array();
   for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
     if (!in_array($products_array[$i]['id'], $products_displayed)) {
       echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
       $products_displayed[] = $products_array[$i]['id'];
     }
   }

   echo '</p>';
 } else {
   echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }
?>

to

<?php
if(!tep_session_is_registered('createaccount')){
 if ($global['global_product_notifications'] != '1') {
   echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

   $products_displayed = array();
   for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
     if (!in_array($products_array[$i]['id'], $products_displayed)) {
       echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
       $products_displayed[] = $products_array[$i]['id'];
     }
   }

   echo '</p>';
 } else {
   echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }}
?>

this should do it but i have to figure out a way to logoff the customer or add a logoff link

Link to comment
Share on other sites

Ah yes, add it to sessoin variable - of course!

 

I realised that the logoff link is still necessary even when no account is created so I changed it slightly to

 

only disable the one link in the header - myaccount

unregister the variable in logoff.php

 

I did manage to screw things as a cusotmer up a couple of times:

 

Firstly by pretending to be a customer who goes to checkout without an account, hits the 'back' button on his browser and tries to create an account. Unlikely to happen though I hope.

 

Secondly I got into a loop where it kept asking for a payment method even after I had entered one. The sequence here had been that I had created one of these non-accounts and gone off for a cup of tea. Then coming back later and finding my shopping cart empty I added the product to it and tried to check out. Could it be that the session had somehow expired in the meantime?

Edited by radders
Link to comment
Share on other sites

ok i will lookinto these things again.

1- how does it screwup if the customer clicks back and tries to create an account

maybe i should kick the customer to index.php if they enter create account and they are logged in. how does the regular create_account behaves? just rambeling but if you have a better idea

2-probably the sssion expired but then i thought login should expire with the session shouldn't it? at this stage an account is created anyway. i will put a random variable in password on the next version

 

do you know where the session is terminated because of time lapse{in what file} so i can have the email erased and i guess i have to erase the email on logoff also

maybe i should take a look at pwa again

ps i have changed the cosmetics a bit on my site to reduce the heights of checkout_shipping so if you want to let me know what you think

Edited by nana
Link to comment
Share on other sites

1 - Hitting the back button and resending the information. It screws up because hte account has already been created at this point. So you cannot go back and create another account without removing the first one. If you select log off (I hadn't thought of this) - the email should be deleted if created without account. Alternatively go back to the checkout with or without an account.

 

The session expiration if that is what is causing it is probably a server thing. I agree, I thought the login should have expired but it didn't :-) If the customer returns to the shop later couldn't it delete the old email if it was created without account and set up a new account?

 

My biggest worry with all of this is to end up barring customers fom the shop because their email exists in our files.

 

Your demo page looks good now. The only thing I'd change wold be moving the password and password confirm fields in line with all the other fields on the page.

Edited by radders
Link to comment
Share on other sites

For some reason I cannot get your last fix (to hide the notifications and log off) to work:

 

i am placing the following code in my create_account.php file directly after the other registration commands:

 

   if  ($createaccount == 'N') {
  tep_session_register('createaccount');
  }

 

Then I am replacing the notification command in my checkout_success with the following:

 

if ((tep_session_is_registered('customer_id'))&&(!tep_session_is_registered('createaccount'))) {
if ($global['global_product_notifications'] != '1') {
  echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

  $products_displayed = array();
  for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
    if (!in_array($products_array[$i]['id'], $products_displayed)) {
      echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
      $products_displayed[] = $products_array[$i]['id'];
    }
  }

  echo '</p>';
} else {
  echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
}
}

 

I have done an order by logging in, created an account, and purchased without an account...and the notifications NEVER show up. Did I do something wrong?

 

Thanks,

 

Nick

Link to comment
Share on other sites

we do not want the notification option to show up if the customer chooses that they do not want to create an account

no account no notification

yea account yes notification

i hope it makes sense to you

Link to comment
Share on other sites

you are using a wrong code please use the one i provided a couple of messages back

 

i still need to make sure payment modules work please test and post result

Edited by nana
Link to comment
Share on other sites

the solution for going back using the browser

in create_account.php right after

 require('includes/application_top.php');

if (tep_session_is_registered('customer_id')) { 
         tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
     }

this redirects the customer to index if they are loged in

i have to figure out session problem so when the session expires the email has to be removed

1-if they log_off not a big problem

2-when the session expires. i have to find the correct file

Link to comment
Share on other sites

pnkranger

you have

if ((tep_session_is_registered('customer_id'))&&(!tep_session_is_registered('createaccount'))) {

it should be

if(!tep_session_is_registered('createaccount')){

please take a look at the code you pasted for checkout_success.php

and compare it to mine and you will see the diffrence

enjoy and please post if you have other difficulties

david i think i might have the solution for session timeout part

i will post shortly

thank you all for helping and debugging this thing.

my only worry is the other payment and shipping modules and i have to try with ccgv also

oh well back to work

Link to comment
Share on other sites

i looked at pwa and liked some of their logic in treating no _accounts so in this version i used these steps that they have used thank you pwa dev group

if non_account wants to purchase again his last account is erased

the search for password forgotten and login is limited to accounts

emails are no longer erased untill the next purchase

account remain invisable to customer at all time including in emails

all from pwa

i might have to look at newsletter functionality since this is not available but is in mine

 

 

payment_shipping combo remains as it was since no bug is reported yet

i think we are almost complete

Edited by nana
Link to comment
Share on other sites

i looked at pwa and liked some of their logic in treating no _accounts so in this version i used these steps that they have used thank you pwa dev group

if non_account wants to purchase again his last account is erased

the search for password forgotten and login is limited to accounts

emails are no longer erased untill the next purchase

account remain invisable to customer at all time including in emails

all from pwa

i might have to look at newsletter functionality since this is not available but is in mine

payment_shipping combo remains as it was since no bug is reported yet

i think we are almost complete

 

I had an interesting thought about the newsletter...instead of giving an option to check it on the create account page (unless they go through the "login.php" page, why not give them the option to sign up for the newsletter on the checkout_success.php page (only if they created an account).

Link to comment
Share on other sites

Hello Nana and all and thanks for the great contribution! I've been working on it all night tonight and have installed all of your fixes including version 1.4. We are processing our transactions with the TrustCommere payment module and everything works perfect, all the way through if a customer inputs the correct credit card number and information. We then tried a test with an incorrect credit card number, the cart rejected the transaction as it should have and we were taken back to the page to change the credit card number. When we changed the credit card infomation to the correct numbers and hit "confirm", the next page came up displaying the previous, incorrect credit card number and information. We tried on Internet Explorer on a PC, Safari and Firefox on the Mac and had the same results each time.

 

Have you or anyone run into this bug yet? If you could advise on how to fix it, it would be greatly appreciated.

 

Thanks again for your hard work!

 

Jess

 

:thumbsup:

Link to comment
Share on other sites

this is not a bug you have to unregister the cc information in checkout_confirmation.php on top of the file you see how i did this for cc and authorizenet and if you uncomment the print command you will see the list of the keys in the session you have to write a few lines like the ones for cc_number with variables from your module and this will resolve the issue

Link to comment
Share on other sites

I have installed the latest version 1.4 and have a problem upon checkout.

All is well until i submit my address and card information, then i get returned to the welcome please sign in screen, not sure why and any help would be appreciated.

 

you can test the contribution and the results at the site

 

Thank you in advance

 

mark

Link to comment
Share on other sites

can you please post the first 50 lines of your checkout_confirmation.php

 

As requested, thanks for the super speedy reply.

 

mark

 

<?php

/*

$Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

// if there is nothing in the customers cart, redirect them to the shopping cart page

if ($cart->count_contents() < 1) {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

}

 

// avoid hack attempts during the checkout procedure by checking the internal cartID

if (isset($cart->cartID) && tep_session_is_registered('cartID')) {

if ($cart->cartID != $cartID) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

}

 

// if no shipping method has been selected, redirect the customer to the shipping method selection page

if (!tep_session_is_registered('shipping')) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

 

if (!tep_session_is_registered('payment')) tep_session_register('payment');

if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];

 

if (!tep_session_is_registered('comments')) tep_session_register('comments');

if (tep_not_null($HTTP_POST_VARS['comments'])) {

$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

}

 

// load the selected payment module

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment($payment);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

Link to comment
Share on other sites

add

foreach ($_SESSION as $key => $val) {
//un comment the next line to see the fields so you can unregister
            //    print $key.' => '.$val.' - ';print_r($val);echo "<br>";
                 $HTTP_POST_VARS[$key] = $val;

                 }

right after

require('includes/application_top.php');

on top of the page and see what happends

if the problem not resolved pm me both your checkout_shipping.php and checkout_confirmation.php or compare them to the files in the contribution

Link to comment
Share on other sites

add
foreach ($_SESSION as $key => $val) {
//un comment the next line to see the fields so you can unregister
            //    print $key.' => '.$val.' - ';print_r($val);echo "<br>";
                 $HTTP_POST_VARS[$key] = $val;

                 }

right after

require('includes/application_top.php');

on top of the page and see what happends

if the problem not resolved pm me both your checkout_shipping.php and checkout_confirmation.php or compare them to the files in the contribution

 

Hi,

 

Thank your for this great contrib, however I have a question. Is it not more logic to have the question of creat an account or not at the top of the page and not at the bottom? How could I move this to the top

 

And the next question I have has not as much to do with this contrib but can you tell me how I could get the progress status bar to the top of the pages also instant of the bottom.

 

Denice

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