Jump to content
ArtcoInc

Purchase without account for 2.3.4 and BS2334

Recommended Posts

Share this post


Link to post
Share on other sites

@@raiwa

I've tested a live shop with V2.1 with the paypal modification, as mentioned above.  The transaction completed ok, payment received, customer returned to shop, the guest account deleted and customer logged out.  Order is flagged as GUEST.  I also tested if a customer walks away after creating the guest account, and then returns, the account is deleted and replaced with a new guest account.

So all is well.  Just need a real customer now to use the guest feature!

 

Thanks for all you help, the addon will prove to be very useful

 

Cheers

Mike


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

@@raiwa

just noticed, when using paypal this code does not seem to work (orders.php)

 

            $link = $check_status['customers_guest'] != '1' ? EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link('account_history_info.php', 'order_id=' . $oID, 'SSL') . "\n" : '';

 

the customer email contains the order link.

 

if another payment method is used, e.g. COD, then the PWA text is used in the email

(NOTE: This email address has been submitted by a visitor to our online-shop. If you were not this visitor, please send a message to: admin@warboyshardware.co.uk. Thank you for your purchase and have a nice day.)

 

I'm investigating but can't find the problem
 


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

@@Mikepo,

 

Oh yes. The modification done in the order mail in checkout process.php need to be applied also in paypal_standard.php

See order mail part starting with line 638 in includes/modules/payment/paypal_standard.php

 

I'll have a look also tomorrow.

 

Thanks for your testing and feedback.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hello Mike @@Mikepo,

 

The same modification like in checkout_process.php should do it in paypal_stanadard.php

 

Find:

// lets start with the email confirmation
      $email_order = STORE_NAME . "\n" .
                     EMAIL_SEPARATOR . "\n" .
                     EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .
                     EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $order_id, 'SSL', false) . "\n" .
                     EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
      if ($order->info['comments']) {
        $email_order .= tep_db_output($order->info['comments']) . "\n\n";
      }

replace by:

// lets start with the email confirmation
  $email_order = STORE_NAME . "\n" . 
                 EMAIL_SEPARATOR . "\n" . 
// PWA guest checkout BEGIN
                 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n";
                
  if(!tep_session_is_registered('customer_is_guest')) {         
    $email_order .= EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $insert_id, 'SSL', false) . "\n";
  }
  
  if(tep_session_is_registered('customer_is_guest')) {         
    $email_order .= constant('MODULE_CONTENT_PWA_EMAIL_WARNING_' . strtoupper($language)) . "\n\n" . 
                    EMAIL_SEPARATOR . "\n"; 
    if($order->content_type != 'physical') {         
      $email_order .= constant('MODULE_CONTENT_PWA_DOWNLOAD_' . strtoupper($language)) . "\n" . 
                      EMAIL_SEPARATOR . "\n";
    }
  }
// PWA guest checkout END

  $email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
  if ($order->info['comments']) {
    $email_order .= tep_db_output($order->info['comments']) . "\n\n";
  }

Please try and confirm.

 

Thank You

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

ok, link to order is no gone,

 

but,

the order number is  missing and also the text MODULE_CONTENT_PWA_EMAIL_WARNING_ is missing

 

I'll check what's missing unless your find it first !

 

Mike


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

@@Mikepo,

 

In this line:

        $email_order .= EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $insert_id, 'SSL', false) . "\n";

it must be "$order_id" instead of "$insert_id"

        $email_order .= EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $order_id, 'SSL', false) . "\n";

And in this line also:

                     EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n";

And in the globals list must be added "$language":

    function before_process() {
      global $order_id, $order, $languages_id, $currencies, $order_totals, $customer_id, $sendto, $billto, $payment, $language;

Thank You, I couldn't test it, I have no paypal_standard correct working on my test stores.

 

Best regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa

just found the errors too, all is well now, emails are as they should be.

 

Thanks for your help, addon works really well :)

 

Regards

Mike


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

@@Mikepo, Thanks to you for testing and reports. I'll upload the update asap.

Share this post


Link to post
Share on other sites

Hi @@raiwa !
 

Ive just installed the update on my Testshop cause Ive got an 

 

Warning: require(includes/languages/german/checkout_pwa.php): failed to open stream: No such file or directory in ..bla..

 

error bevor allready.

 

Now it looks like there is exactly this file missing in your update ?!? Can you confirm this ? 

In step 3 from "Purchase without account for 2.3.4 and BS2334" of your update you told me to upload and replace

 

/includes/languages/english/checkout_pwa.php

 

but I can't find it in your archive...  :wacko: The error stays on screen  :(

 

Thank you for help !

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

Hello Denzel @@Denzel,

 

Yes this is wrong in the update instructions.

There is no checkout_pwa.php file neither language file needed any more.

I'll fix this in the next update.

 

Please apply this step of the update instructions:

4.2 checkout_process.php;
Revert changes of previous version.
Find:
// PWA guest checkout BEGIN
  tep_session_is_registered('customer_is_guest') ? tep_redirect(tep_href_link('checkout_success_pwa.php', '', 'SSL')) : tep_redirect(tep_href_link('checkout_success.php', '', 'SSL'));
// PWA guest checkout END

Replace by:
  tep_redirect(tep_href_link('checkout_success.php', '', 'SSL'));
 

 

The pwa checkout success is now done by the new pwa checkout success content module and the modifications in the core checkout success modules using the core checkout_success.php.

 

Thanks for the report and kind regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hallo @@raiwa !
 

Ok, I got it... In the file catalog/account_pwa.php in row 16 is

 

  require(DIR_WS_LANGUAGES . $language . '/checkout_pwa.php');
 
this has to be 
 
  require(DIR_WS_LANGUAGES . $language . '/account_pwa.php');
 
BTW the languagefile is buggy: an ";" is missing and a ")" is placed wrong (row 22 and 25).
 
SEE YA
Denzel.

Share this post


Link to post
Share on other sites

hi. is this fully working? if so, brilliant.

So if a guest adds something to basket, goes to checkout but doesn't finish order,

what happens to the order after that?

 

does the entry get deleted in the database after a certain time? or does it have to be done manually?

thanks

 

Also, is the 2.2 Reloaded one the latest to use?

thanks for the help

Share this post


Link to post
Share on other sites

@@Denzel, yeah, will fix it, I changed the name of the language file to be the same like the main file and missed to update it in the package. Thanks again, will be fixed asap.

Share this post


Link to post
Share on other sites

@@vampirehunter,

 

the order is not registered in the database until checkout_process.php (or going to PayPal if paypal_standard is used), so no unfinished orders should be in the database.

Customer data will be in the database since they fill in the pwa_account form (when clicking on checkout button in shopping_cart without beeing logged in) until checkout_success or next click if download is inabled.

So there are possibilities that guest customers keep registered. Anyway this version introduces a check if the same customer tries to register again as a guest and the issue is solved by a check query and account delete, if needed, in pwa_account.

Also this version introduced a guest customer flag in admin/customers. So you can always delete old guest entries by hand.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hello Dennis @@Denzel,

 

I checked all and yes, the error in the german language file is confirmed. It's left over from the original version.

 

For the language inclusion I can't confirm.

In the provided account_pwa.php file it's correct:

  require('includes/languages/' . $language . '/account_pwa.php');

You should replace the file.

In the update instructions it says:

3. Upload and replace files:

/account_pwa.php
 

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hi @@raiwa !
 

yes, you are right. Looks like this was the old file from deDokta (RIP).

Now Im up to date. Thank you for helping me !

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

I have installed this contribution and downloaded everything. I currently have the BS 2.3.4 version.

 

All seems good so far but I tried to do a test and it says that my first name needs 250 characters lol.  I must have done something wrong somewhere :unsure:

 

Does anyone have a suggestions on how I can correct this ?

 

Thank you in advance.

Share this post


Link to post
Share on other sites

@@sunshynecraftsbeads,

 

this is in account_pwa.php? Did you update from previous version or did you a new installation??

Do you have any modification added to the core create_account.php, any additional checks??

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Tracie @@sunshynecraftsbeads,

 

Forgot to ask:

Which is your setting in:

Admin-Configuration-Minimum Values-First Name??

Share this post


Link to post
Share on other sites

@@Mikepo, @@ArtcoInc

 

@@burt
 
A substantial portion of my customers choose to use the guest checkout ... even returning customers. So, give them what they want ...
 
So, as far as I can see, yes. The only difference is a password. I've considered adding a "Thank you, Guest, for your order. You can still create an account with us ... all you have to do is enter a password." page after the guest checkout, but I'm out of round toits.
 
Malcolm

 
I believe it would be quite easy to add this to PWA Checkout:

- Optional configuration setting for checkout success module to offer to keep the account and set password.
- Modify the pwa product list content module for checkout_success.php to not delete the guest account.
- 2 buttons:
- one "I would like to keep my account and set a pasword" which links to the set password module like the PayPal express guest checkout.
- another button"Thank You, I do not wish to keep my customer data stored" which links to home like the continue button. Using it will delete the customer data by the pwa header tag like if download is enabled, the same if they use the continue button.
 
Required changes:
- leave guest password empty instead to fill in a random password in account_pwa.php
- modify the pwa product list content module like described.
 
Give me a week or so and I'll try.
 
Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Tracie @@sunshynecraftsbeads,

 

Forgot to ask:

Which is your setting in:

Admin-Configuration-Minimum Values-First Name??

Turned out that it was in the admin- config - minimum values area. Changed it now it's fine. I will be testing it later but I am sure that everything will be great. Thank you so much for the help and for this contribution. You are the Best !!!!

Share this post


Link to post
Share on other sites

@@raiwa

one thought, if a guest customer is asked to review the product bought, the current functionality only allows a review to be made if the customer has an account.

 

So, to get over this issue, could a random token be assigned to the guest customer order, so when the guest attempts to make a review a token is passed and if this matches the guest taken on the order, then a review can be made.

 

Hope that makes sense

 

Mike


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

Hello Mike @@Mikepo,

 

I do not see an easy way to do this without a lot of changes.

Reviews are only allowed to logged in users, so if we use a link to the ordered products in the order confirmation mail, we would need to add a token and overwrite the logged in check for the reviews write page.

It seems a lot of "engineering", but I'll think about.

 

Maybe we could first see how the optional set password and keep account thing works, then they can write a review.

 

Another possibility would be to ask for a Testimonial by mail and add it from admin.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

one thought, if a guest customer is asked to review the product bought, the current functionality only allows a review to be made if the customer has an account.

 

So, to get over this issue, could a random token be assigned to the guest customer order, so when the guest attempts to make a review a token is passed and if this matches the guest taken on the order, then a review can be made.

 

Hope that makes sense

 

Mike

That's easily done Mike and has already been done - read from here.  


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

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

×