Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

JABevan,

 

[ just noticed the money order info you mentioned ]

 

What you could do to solve all your problems, is change the title Purchase Without Account to 'Express Checkout' or something. you can mention to the customers that they can checkout without creating an account, but don't put so much emphasis on the 'deletion of customer info', though you still remove their account from the customers table. Change the print invoice module to grab all info from the orders table and require the customer to enter say order ID and zip code, or last name and zip code or something like that to view invoice. Then even PWA customers can view and print invoice.

 

This is just some ideas and I'm not sure the pros cons of doing it this way but it is just what popped into my head. It will take a little work to do this, but I think it should work.

Share this post


Link to post
Share on other sites

Hi There,

 

I cannot get past where you enter your info in the PWA account it is just a blank page... Can you help me figure out what went wrong...

 

Thanks & Greets from Germany

 

Panzz

Share this post


Link to post
Share on other sites

panzz

 

Do you have STS installed? If so you need to include your column right in Order_Info_Process.php.

 

Details of this are given earlier on in this thread.

 

If you don't have STS I'm afraid I don;t know what it is.

 

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

 

sorry, I think i'm a little newbee.....

 

How can I check if STS installed or not?

 

Thanks & Greets,

Panzz

Share this post


Link to post
Share on other sites

panzz

 

STS is the simple template system, a contribution that you can install. If you don't know about it then I assume that you don't have it. If you do then there will be a file called catalog/includes/sts_template.html. If that isn't there you don't have STS.

 

In that case I don't know what your problem is with PWA. That was just a cause of similar problemsthat I'm aware of.

 

The only other thing I can suggest is that you go over the installation instructions very carefully one more time. I'm sure you've done that but just check again.

 

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

 

thanks for the info, so I have the STS installed.

 

Other people have no problem with the PWA, only when I will test the function I got the error with the white/blank page, after I type in the customer details for check out.

 

So is it a OS problem, or a error on my PC MSIE? I checked the function also with Mozilla and had the same error?

 

Hope my english is understandable :D

 

Greets,

Panzz

Share this post


Link to post
Share on other sites

Has anyone had a problem after the PWA was installed that the pop up of

 

"This page contains both secure and nonsecure items, Do you want to display nonsecure items?"

 

This message never came up prior to installing the PWA contrib.

 

Any thoughts?

Share this post


Link to post
Share on other sites

Panzz

 

In that case you need to include the column right in your Order_Info_Process.php.

 

To do this see the 2nd post on page 42 of this thread.

 

Tim

Share this post


Link to post
Share on other sites

@Tim

 

Many thanks for the HELP, now it works!!!! :)

 

Have a nice weekend.....

 

Greets from Germany

 

Panzz

Share this post


Link to post
Share on other sites
JABevan,

 

Sorry I haven't been on the forums much lately.

 

The customer information is actually killed in checkout_success.php and not in checkout_process.php.

 

I am confused as to what you are trying to do now? Do you want your PWA customers to be able to print an invoice on checkout success? Or do you want to remove the print button on checkout_success.php, so everyone except pwa customers can print an invoice. I mentioned

 

A cusomter is logged in normally :

 

if(tep_session_is_registered('customer_id'))

 

A customer is logged in with PWA:

 

if (tep_session_is_registered('noaccount'))

 

so that you could remove the button for pwa customers.

 

From what I understand, the customer information is deleted once checkout_process.php loads so I'm not sure what other ways there are to allow a PWA customer to print an invoice since their information no longer exists and of course we can't create a table to store just their information since that defeats the whole purpose of PWA. I don't think its a good idea to give access to the orders table as was mentioned in the post you quoted.

 

I think the best option is to not show the print invoice button to pwa customers.

Just a thought to PrintOrder contrib with PWA problem

 

would it be secure enough if we examine in the checkout_success.php page if the customer is PWA, if s/he is then crypt the order_id (with the key admin defines) and add for instance 'pwa' to it.

order_id=<pwa><crypted oID => order_id=pwa984747

 

Pass the crypted oID to printorder.

 

Printorder could then examine if Order_id contains 'pwa'. If it contains, it de-crypts the real order_id and shows the printable order to the PWA customer.

 

To add security (so that there is no way to bookmark the page) this is possible to do - lets say - only 20 minutes after the purchace.

 

I know it is not the most secure solution, but would it be secure enough??

Edited by Ternet

Share this post


Link to post
Share on other sites

Well, the PWA/Print Orders situation doesnt seem to be solved yet, but has anyone figured out how to get the invoice to show up as soon as the customers click the print order button? What happens on all my sites is that when they click the button, the login page comes up first instead of just shoeing the invoice. It is very annoying.

Share this post


Link to post
Share on other sites

Hi everyone!

 

Thanks so much for the great contrib...

 

I have installed it and everything works, but I decided that it just isn't for me!

 

Can anyone please an unistall method which includes database unistall, and also which files to delete and which files to delete the specific code from?!?!

 

If anyone could do this I would really appreciate it!!!

 

Thanks so much!

Share this post


Link to post
Share on other sites

anybody -

 

Safoo wrote the following in response to the PWA/PrintOrder issue:

 

The customer information is actually killed in checkout_success.php and not in checkout_process.php.

 

Is it possible to put a timed delay on this? Like 20 minutes, as Ternet suggested? I'd imagine it could be done. All we're talking about is a session here right?

 

How many others are having this problem? I guess we know of a half-dozen or so right now...

Share this post


Link to post
Share on other sites

We'd be talking about a change to this code, right:

 

// PWA:  Added a check for a Guest checkout and cleared the session - 030411 v0.71
 if (tep_session_is_registered('noaccount')) {
 $order_update = array('purchased_without_account' => '1');
 tep_db_perform(TABLE_ORDERS, $order_update, 'update', "orders_id = '".$orders['orders_id']."'");
//  tep_db_query("insert into " . TABLE_ORDERS . " (purchased_without_account) values ('1') where orders_id = '" . (int)$orders['orders_id'] . "'");
 tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'");
 tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'");
 tep_session_destroy();
}  

Share this post


Link to post
Share on other sites

Commenting out the last line did work.

 

//  tep_session_destroy();

 

Now I'm doing research on a timed destroy...

Share this post


Link to post
Share on other sites

A client has been bugging me that the create account is too complicated if the person just wants a simple order, Thanks to everyone working on this contrib!

 

Anyway i dont know if its been mentioned before, but i noticed the login page displayed the 'proceed to checkout without creating acount' button even if they dont have any items yet (which doesnt make sence beucase they cant procede to checkout yet) and the script gave an error)

 

to combat this i make it display the page without the login box, if the basket is in fact empty

 

just change in catalog/login.php

 

<?php
if (PWA_ON == 'false') {
require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);
} else {
require(DIR_WS_INCLUDES . FILENAME_PWA_PWA_LOGIN);
}
?>

 

to

 

<?php
if (PWA_ON == 'false' || ($cart->count_contents() == 0) ) {
require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN);
} else {
require(DIR_WS_INCLUDES . FILENAME_PWA_PWA_LOGIN);
}
?>

 

hope it helps somebody

 

Barry

 

PS. in response to mijman2 post about uninstalling, the best solution would be to simple restore a backup from just before you installed it (you did make one didnt you ;) ), failing that it should be fairly easy to reverse the steps of the uninstall, but you will probably still need backups of the modified files as the install only includes the new code. SQL code to delete entires should be (backup your database first as i havent fully tested this code)

ALTER TABLE customers DROP INDEX purchased_without_account;
ALTER TABLE customers DROP purchased_without_account;
DELETE FROM configuration_group WHERE configuration_group_id = 40;
DELETE FROM configuration WHERE configuration_group_id = 40;
ALTER TABLE orders DROP purchased_without_account;

Although in actual fact you should just be able to turn the contrib off using the config section of the admin, and then it would look like it never existed (expect the switch it back on ;-) )

Share this post


Link to post
Share on other sites

O ya!

I forgot about the turn off switch... The problem with the backup is that If i were to back it up, I would lose other contributes that I have installed along with products :wacko: ...

So i will simply turn it off!

Share this post


Link to post
Share on other sites

What's wrong with this code? I get a parse error and cannot find the problem.

 

OPEN AND MAKE CHANGES IN THIS FILE: /catalog/create_account.php

change:

(v0.71) CODE

if ($check_email['total'] > 0) {

$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);

}

 

[/code]

 

to this:

 

CODE

if ($check_email['total'] > 0) {

//PWA delete account

$get_customer_info = tep_db_query("select customers_id,

customers_email_address, purchased_without_account from " . TABLE_CUSTOMERS . "where customers_email_address = '"

. tep_db_input($email_address) . "'");$customer_info = tep_db_fetch_array($get_customer_info); $customer_id =

$customer_info['customers_id']; $customer_email_address = $customer_info['customers_email_address']; $customer_pwa =

$customer_info['purchased_without_account']; if ($customer_pwa !='1') { $error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS); } else { tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'"); tep_db_query("delete from " .

TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); tep_db_query("delete from " .

TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'"); tep_db_query("delete from " .

TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'"); tep_db_query("delete from " .

TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'"); tep_db_query("delete from "

. TABLE_WHOS_ONLINE . " where customer_id = '" . $customer_id . "'"); }

//End PWA delete account

 

 

This came from the instructions to change to.

Thanks so much.

Share this post


Link to post
Share on other sites
How would PWA work alongside Credit Class/Gift Vouchers/Discount Coupons?  Has anyone tried this?

Razorjack

 

I have these two installed and they work OK together. I just have a warning in the "Proceed directly to checkout" box in login.php to warn people not to use that option if they're purchasing vouchers.

 

If they did still do this you would just need to email them some vouchers in place of the ones they would have "destroyed" by deleting their account in the PWA process.

 

Tim

Share this post


Link to post
Share on other sites

Question : do you find it normal that when you login as a customer without an account, you have access to "my account" (header bar) where you can change your account information, past orders, change password, etc.

 

For me the client should NOT have access to it. He can only pass an order and that's all.

 

right ?

 

Didier.

Share this post


Link to post
Share on other sites

Here is the code for header.php if you do not want to see the 'logoff' and 'my account' buttons in the header :

 

Change around line 99 :

 

<?php if ((tep_session_is_registered('customer_id')) && (!tep_session_is_registered('noaccount'))) // DDB - PWA - 040622 - no display of logoff for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?>

</a>  | 

<?php } ?>

 

<?php if (!tep_session_is_registered('noaccount')) // DDB - PWA - 040622 - no display of account for PWA customers

{ ?>

<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?> </a>  | 

<?php } ?>

 

I also had to change the text in checkout_success.php as it tells the client that he can consult his order. I just added "In case you have created an user account, you can..."

 

Another error is saw is with Order_Info_Process.php where there is a reference to NAVBAR_TITLE_2 that does not exist. I just dropped that line in the code.

 

Nice contrib !

 

Didier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×