Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

OK, pretty nifty contrib, works great from customers point of view, but buggers up my admin - I cant send any emails to customers about their orders - when I try, I get a message saying

Fatal error: Call to undefined function: _query() in /homepages/28/d30307649/htdocs/oscommerce-2.2ms2/jewellery/admin/orders.php on line 52

 

Obviously the systme has no idea what I am asking it to do.....I have gone back over the install readme a number of times, and nowhere is this function defined......what have I missed??

 

P.S. The line in question is this:

_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){          $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Share this post


Link to post
Share on other sites

you did a mistake : it must be tep_db_query and NOT _query.

 

This is the readme :

 

// start pwa changes  $pwa_check_query= tep_db

_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){           $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); } 
else {   $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }           tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

          $customer_notified = '1';         }

A <CR> must have slipped in the file..

 

Didier.

Share this post


Link to post
Share on other sites

Thanks Didier, did the trick nicely, just by adjusting the first line like this:

 

// start pwa changes

 

$pwa_check_query= tep_db_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){          $email = STOR_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }

else {  $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); }          tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

          $customer_notified = '1';        }

 

Working like a charm...... :D


Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Share this post


Link to post
Share on other sites

Hi... i installed this contrib and it initially worked fine but no this error comes up and I am not sure why:

 

1062 - Duplicate entry '25' for key 1

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('25', '0', now())

[TEP STOP]

 

Is something wrong with my database or does it look like a php coding error?

Share this post


Link to post
Share on other sites
I have ran into a problem in create_account.php where I get the error

Parse error: parse error, unexpected $ in /home/dragon26/public_html/shop/create_account.php on line 558

 

This is the only contrib I have installed that involves this file... Can someone please help me to understand the issue here? :blink:

what's your code around these lines ? You must have a simple php syntax error.

 

Didier.

Sorry for the late reply but I have not been on a PC that I could chk my mail from in a week or so... anyway.. he is a snippit around that line.. funny thing is that file only has 557 lines..

 

<?php include(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
? ?</table></td>
?</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

**EDIT** BTW I did chk for white space at the bottom of the file... nada..

Edited by Twizted

Share this post


Link to post
Share on other sites

I have just installed the PWA module.

I hope someone could help me with these 2 questions.

 

I) How can I add/remove fields in the "order info" form in order to make the whole process simple?

 

II)What should I edit if I want to bring customers all the way to "Order Confirmation" after filling in the "order info" form(i.e. skip "delivery info" and "payment info" as there is only one option)?

 

Thank you.

Share this post


Link to post
Share on other sites

I've just upgraded PWA to 0.80 and it fixed quite a few bugs I was concerned with, however the one thing that you said it fixed, didn't seem to get fixed in my case. When I checkout with PWA, it isn't supposed to show the My Account and Log Off in the header, howerver it still does. Anyone have any ideas? I did replace the includes/header.php file if that's what you're thinking. Any help is appreciated.

Share this post


Link to post
Share on other sites
There is a fatal flaw in this contribution and I wish I knew how to fix it. There needs to be a way to delete a customer after they have made a purchase using PWA. I know you can already delete customers easily in admin but there has to be a way to tell the difference between customers who created an account with their own password and those who only used PWA. If a customer used PWA and wants to come back, they cannot use the email they used the first time unless they are removed. However, one cannot figure out who has intentionally created an account and who has used PWA because a password is generated automatically for both methods. A simple check mark next to the name of those who created an account or for those who used PWA would suffice but something must be done to differentiate.

I am really feeling your pain on this. I havent even launched my website yet, but this is a large issue that needs to be resolved.

 

It seems that if I create a PWA order, dup email checking is turned off. PWA doesnt care about dup email address's. However, if I create a PWA order and then decide at a later date to create an account, I cannot because the account creator has dup email checking turned on.

 

What I propose is just adding a new coloumn to the customers table called PWA that will be set to either 1 or 0. When you checkout using PWA, it will set the bit to 1 for that customer entry. When you create an account in the account creator will set the bit to 0. Then edit the account creator email checking query to add the "AND PWA = '1';" to the end. This way, it will only check for dup email address's for accounts and exclude PWA order entries.

 

good idea, bad idea? please help me logically think this through and provide input. maybe there is already an easy solution I dont know about.

Share this post


Link to post
Share on other sites

*sigh*

 

It looks as if I am a little late on the idea. I suppose I deserve it for concentrating more on reading the forums than digging in. :o

 

I may have missed something on install, because the scenario I described above is still present.

Share this post


Link to post
Share on other sites

I;ve got a tricky one.

 

Basically, PWA works, but when I get to Order_Info_Process.php - it will go no further. OS confirms the Customers details with no errors, but clicking continue just refreshes the page.

 

Checking out with an account works ok, but PWA gets stuck there.

 

Any ideas please??!

 

Cheers, Paul.

Share this post


Link to post
Share on other sites
QUOTE (cdi-buy.com @ Jul 11 2004, 03:27 PM)

There is a fatal flaw in this contribution and I wish I knew how to fix it. There needs to be a way to delete a customer after they have made a purchase using PWA. I know you can already delete customers easily in admin but there has to be a way to tell the difference between customers who created an account with their own password and those who only used PWA. If a customer used PWA and wants to come back, they cannot use the email they used the first time unless they are removed. However, one cannot figure out who has intentionally created an account and who has used PWA because a password is generated automatically for both methods. A simple check mark next to the name of those who created an account or for those who used PWA would suffice but something must be done to differentiate.

My solution to PWA's 'fatal flaw' is to use the guest flag code from Guest Account v2.0 with PWA. This flags PWA accounts with '@_' before the lastname and email address, therefore:

- removal of PWA accounts is easy, they are flagged and listed first,

- repeat PWA is possible,

- creation of accounts after PWA is possible,

- PWA after an abandoned cart is possible.

 

This works great, and the only bug I found is a SQL error if the customer's lastname has an apostrophy (i.e., O'Conner). This is also a bug in Guest Account v2.0, apparently caused by this code:

 

// Guest Account Start
   if ($guest_account) $sql_data_array['guest_flag'] = '1';	
   tep_db_query("update " . TABLE_CUSTOMERS . " set customers_email_address = '@_" . $email_address . "' where customers_email_address = '" . $email_address . "' and guest_flag = '1'");
   tep_db_query("update " . TABLE_CUSTOMERS . " set customers_lastname = '@_" . $lastname . "' where customers_email_address = '@_" . $email_address . "'");
// Guest Account End

As soon as I can fix this bug, I will share the combined PWA/Guest Account solution as a contribution. Any help with the fix is greatly appreciated. :)

 

Regards,

EricK

Share this post


Link to post
Share on other sites
What I propose is just adding a new coloumn to the customers table called PWA that will be set to either 1 or 0. When you checkout using PWA, it will set the bit to 1 for that customer entry. When you create an account in the account creator will set the bit to 0. Then edit the account creator email checking query to add the "AND PWA = '1';" to the end. This way, it will only check for dup email address's for accounts and exclude PWA order entries.

 

This issue had been discussed quite a bit a few months back. I believe it was around page 33ish in this thread and we did use a flag bit in the customer's table and everything was corrected. We also checked for duplicate emails and made a correction for when customers begin the PWA checkout process but do not complete checkout and then try to checkout some time later. thirdly, there was also discussion on removing the 'my account' etc links around the same pages.

 

I suggest someone go back and read those pages to save yourself the extra work!

Share this post


Link to post
Share on other sites

Just tried to install this great Contribution. But there are some things I just can't get to work.

 

1. I keep getting this error when I am trying the contributions, just when I have entered the name/address and so on, I click next, and this error comes:

 

Fatal error: Session variable noaccount is not globally defined

 

Warning: Cannot modify header information - headers already sent by (output started at /customers/moob.dk/moob.dk/httpd.www/shop/includes/functions/sessions.php:303) in /customers/moob.dk/moob.dk/httpd.www/shop/includes/functions/general.php on line 29

 

I have installed Infobox Skin Manager. And had to modify the header.php just a bit. something I line 62, 63, 64 of the included header.php can that be the result of that?

 

2. In Order_Info.php, how to change so that it is not separated by several categories. I have maid that for create_account.php, so that there is only one category, and name, address, e-mail, phone and so one, is in the same table. How/what file to change that in Order_Info.php (can not find that in the file).

 

3. In login.php, the 3 boxes, is not cantered, and is not as big as they could be, tried to change size in login_pwa.php, but that resulted that text and buttons are not displayed. I use Center Shop, to centre my oscommerce shop, maybe that is the problem?

 

4. And last but not least, in the bottom of my store, there is an image which should be the same size as the rest of my shop. But the files I have edited, the image is filling the whole side, and not just the centre like the rest. Is there a way to correct that? Not that important, but just irritating :).

Share this post


Link to post
Share on other sites

Am using the latest version of this contribution. When I go to edit an order status, view it's invoice or packing slip the page fails to display the actual product(s) sold in the order but does display the prices and shipping addresses.... the url in question is for example this: /admin/orders.php?page=1&oID=382&action=edit

 

and the error message that I get is this:

 

1054 - Unknown column 'orders_status_id' in 'field list'

 

select orders_status_id, date_added, customer_notified, comments from orders_status_history where orders_id = '382' order by date_added

 

[TEP STOP]

 

is there is a simple problem in my database that is causing this? I can't get my head around this one and need urgent help..... many thanks in advance to anybody who can assist....

Share this post


Link to post
Share on other sites

Is it possible for an unregistered user to check the status of the order online, with PWA?

 

if not, then how do i remove the link that is sent to the customer where they can check the status?

Share this post


Link to post
Share on other sites

I'm using PWA 0.80.

 

Everything works great except when successfully completed, the purchaser gets the following:

Parse error: parseerror, unexpected T_STRING

in /home/.gallant/niganit2/menswork.org/catalog/includes/languages/english/checkout_success.php on line 28

 

My store is at Menswork Online Registration

 

I am at a loss to fix it! Anyone got any ideas?

 

Thanks a bunch,

Rich

 

<_<

Share this post


Link to post
Share on other sites

Howdy

Just installed .80 on a clean 2.2 install...cannot get the default page to display. get the error:

 

Fatal error: Call to a member function on a non-object in /home2/linen02/linencloset-www/catalognew/includes/header.php on line 51

 

perhaps because the catalog directory/folder is catalognew? I've run .70 on another site without problems...

thanx, bopp

Share this post


Link to post
Share on other sites

that code is:

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

 

pwa works okay if i comment that out but don't want to do that...

bopp

Edited by bopper

Share this post


Link to post
Share on other sites

new problem on the checkout_shipping.php page...can't find this function!

bopp

 

 

Fatal error: Call to undefined function: tep_get_address_book_list()

Share this post


Link to post
Share on other sites
I am getting an error on the following code in Order_Info_Process when a customer who already has an account tries to purchase without an account. I want it to bypass this check altogether.

 

if ($check_customer['purchased_without_account'] != 1) {

tep_redirect(tep_href_link(FILENAME_LOGIN,'login=fail&reason=' . urlencode(

str_replace('{EMAIL_ADDRESS}',$check_customer['customers_email_address'],PWA_FAIL_ACCOUNT_EXISTS)), 'SSL'));

 

The error I am getting is:

 

The requested URL /login.php/login/fail/reason/An+account+already+exists+for+the+email+address+<i>donna@ukgoods.com</i>.++You+must+login+here+with+the+password+for+that+account+before+proceeding+t

o+checkout. was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

How can I get rid of this error?

 

Thanks,

 

Donna Gordon

UKGoods

 

PS Sorry for the multiple postings. I didn't realize I was supposed to post my question in this thread.

Did anyone manage to fix this please?

I get the same problem unless using a completely different name to test the system. Also when using a new name, it actually creates an account for that person name so you can't PWA more than once!

Sorry if this question has been answered, but I can't see the answer.

Share this post


Link to post
Share on other sites

Does the latest version of PWA still need you to update the blank password within "Order_Info_Process.php"? The documentation is vague on this (it looks like old, outdated instructions are still tacked onto the end of the install instructions).

-Graham

Share this post


Link to post
Share on other sites

How can I change the width of the box tables in order_info.php? I'd like to set the width to 100%. I've changed all of the width parameters in order_info.php and order_info_check.php, but still only get a width of about 75%. You can see what Im talking about using this link.

Share this post


Link to post
Share on other sites

Can you please answer this about PWA 0.80:

 

Take a look at my site and you'll notice the error in the login box, dont understand why, yet i followed all instructions.

 

www.pleasurezone.uk.com/store

 

BOX_HEADING_LOGIN_BOX

 

BOX_LOGINBOX_EMAIL

 

BOX_LOGINBOX_PASSWORDBOX_LOGINBOX_FORGOT_PASSWORD

 

BOX_LOGINBOX_TEXT_NEWBOX_LOGINBOX_NEW

 

Also, i get this error when filling out the shipping details for postage, within the 'go straight to checkout' process:

 

1054 - Unknown column 'purchased_without_account' in 'field list'

 

select customers_id, purchased_without_account, customers_firstname, customers_password, customers_email_address, customers_default_address_id from customers where upper(customers_email_address) = 'S.MITCHENER@NTLWORLD.COM' and upper(customers_firstname) = 'STEPHEN' and upper(customers_lastname) = 'MICHENER'

 

[TEP STOP]

 

also, how can the text be changed so its different in login for an account and straight to checkout, as for the reason why we need their details, as it doesnt make sense at moment

 

ps, the sql HAS been done

 

thank you


Hope it helps...

PC Planet

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  

×