Jump to content
ArtcoInc

Purchase without account for 2.3.4 and BS2334

Recommended Posts

Hello Veli Matti @vmn

1. Stock 2.3.4.1 CE still contains this compatibility code. If you do not wish to have it in your file, remove it or apply the manual modifications.

2. It is possible that you have the database migrated without installing the old module.

Please try the following:

- uninstall the pwa login content module

- search in your configuration table for pwa configuration entries:

SELECT * FROM `configuration` WHERE `configuration_key` LIKE '%PWA%'
SELECT * FROM `configuration` WHERE `configuration_key` LIKE '%GUEST_CHECKOUT%'

if you find any, delete it.

The search in your configuration table for:

SELECT * FROM `configuration` WHERE `configuration_key` LIKE 'MODULE_CONTENT_INSTALLED'
edit it and check if you find in CONFIGURATION_VALUE: /cm_pwa_login;login
If yes, delete it
 
3. The language definitions are stored as configuration values in the database to avoid editing of stock language files.

Share this post


Link to post
Share on other sites

Aargh! It was my Firefox cache problem. After clearing the cache, point #2 is solved.

Everything is ok now.

Share this post


Link to post
Share on other sites

 

I made the following changes to use the global STORE_OWNER_EMAIL_ADDRESS value:


in catalog/includes/modules/content/login/cm_pwa_login.php

find:

'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:  " . STORE_OWNER_EMAIL_ADDRESS . ". Thank you for your purchase and have a nice day.'

replace with:

'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: %s. Thank you for your purchase and have a nice day.'

in /catalog/includes/hooks/shop/checkout_process/pwa.php

find:

      $email_order .= constant('MODULE_CONTENT_PWA_EMAIL_WARNING_' . strtoupper($language)) . "\n\n" .
      
replace with:

      $email_order .=  sprintf(constant('MODULE_CONTENT_PWA_EMAIL_WARNING_' . strtoupper($language)),STORE_OWNER_EMAIL_ADDRESS) . "\n\n" .

Share this post


Link to post
Share on other sites

@vmn

Not necessary. I had an issue some time back with some code inside of a definition. In the language file, if I used define() to establish the definition, things worked. If I used const() , things failed. But, in hindsight, I now see the period after the at sign in the email address, so ... that isn't the problem.

Anyway, it was a long shot ...

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Thanks @raiva.

Quote

Stock 2.3.4.1 CE still contains this compatibility code

It looks like the code base is spreading more and more. That's sad, in my opinion.

Quote

It is possible that you have the database migrated without installing the old module

I indeed had some leftovers of the old NON-BS PWA in the db. After if I cleaned those, I got stuck with the corrupted Firefox cache. I should've realized that faster. Even if I added some error_log lines into application.top, the line number shown in the error report remained unchanged.

Share this post


Link to post
Share on other sites

Hi,

I would like to put the email adress in the output mail of the order to me and customer. Which file i need to edit, the checkout part or de orders part.

Greetings, Anne

 

Share this post


Link to post
Share on other sites

@Dj-Viper hello Anne,

Is this related to PWA? Anyway the e-mail text is defined in checkout_process.php and for some payment modules like paypal express in the payment module. Search for:

$email_order = 

The PWA module appends some text in the pwa hook, if you need to change something only for guest orders in that part.

Best regards

Rainer

Share this post


Link to post
Share on other sites

Hi, Raiwa

Yes.

When a customer is registred the email of a order made is send out, have that edited to include the email adres of the customer.

When they use the PWA than the standard mail without the edit is send. So i'm guessing is that PWA has his own mail setup.

Greetings, Anne

 

Share this post


Link to post
Share on other sites
1 minute ago, Dj-Viper said:

When a customer is registred the email of a order made is send out, have that edited to include the email adres of the customer.

When they use the PWA than the standard mail without the edit is send. So i'm guessing is that PWA has his own mail setup.

PWA (at least the last versions which use hooks) does not replace the standard mail neither generates it's own mail. It only appends data to the standard order mail.

So in order to help, you should post your changes and tell us which exact PWA version you are using.

Share this post


Link to post
Share on other sites

Hi, 

PWA at the moment 2.5r2

In checkout_process i have, this gives me order email with email of customer in it.

// lets start with the email confirmation
  $email_order = STORE_NAME . "\n" . 
                 EMAIL_SEPARATOR . "\n" . 
                 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
                 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $insert_id, 'SSL', false) . "\n" .
                 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
// PWA guest checkout
  echo $OSCOM_Hooks->call('pwa', 'PwaCheckoutMailMod');

  if ($order->info['comments']) {
    $email_order .= tep_db_output($order->info['comments']) . "\n\n";
  }
  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
                  EMAIL_SEPARATOR . "\n" . 
                  $products_ordered . 
                  EMAIL_SEPARATOR . "\n";
   for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
  }
   if ($order->content_type != 'virtual') {
    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
                    EMAIL_SEPARATOR . "\n" .
                    tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
  }
   $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                    EMAIL_SEPARATOR . "\n" .
                    EMAIL_TEXT_MAIL . $order->customer['email_address'] . "\n" .
                    EMAIL_SEPARATOR . "\n" .
                    EMAIL_TEXT_PHONE . $order->customer['telephone']. "\n" .
                    EMAIL_SEPARATOR . "\n" .
                    tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
  if (is_object($$payment)) {
    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
                    EMAIL_SEPARATOR . "\n";
    $payment_class = $$payment;
    $email_order .= $order->info['payment_method'] . "\n\n";
    if (isset($payment_class->email_footer)) {
      $email_order .= $payment_class->email_footer . "\n\n";
    }
  }

Greetings, Anne

 

Share this post


Link to post
Share on other sites

This should work also for Guest orders. Another thing maybe that you have telephone input disabled for guests and get therefore an empty entry for telephone.

To clarify this more, can you please post sample screenshots of a regular order mail and a guest order mail to see the difference.

Share this post


Link to post
Share on other sites

Hello Anne @Dj-Viper,

I'm going back to the public forum. Others may have a similar problem and can profit by the information.

Most payment modules use the standard checkout processing through checkout_process-php. Orders are created, stored and the order confirmation mails created in that file.

But some payment modules bypass this file and do their own order processing including the order confirmation mail creation in the payment module. The coding is therefore included in the payment module.

The only payment module included in a standard oscommerce store doing so is PayPal standard.

Now in your case the "payment processor ideal" you are using does the same. You have to apply the modifications in this payment module which is located in: includes/modules/payment/.

Please use the instructions for the PayPal standard module as a guide how to apply the PWA modifications to your payment module. Instructions may not fit literally the code of your payment module, you have to try to find the equivalent code.

Also add your modifications to include the customer mail and phone there.

You do not need to apply the modifications to all payment modules, only the ones which bypass the standard checkout_process.php like your "payment processor ideal" and therefore do not use the modifications done in checkout_process.php.

Hope this clears up your questions and helps

Best regards
Rainer

Share this post


Link to post
Share on other sites

Hi,

Was correct, the payment module of Ideal (dutch payment) was sending there own oscommerce mails. (developers of it first denied it) but than they gave me right and pointed to the right file to edit.

Greetings, Anne

 

Share this post


Link to post
Share on other sites

I like this module very much and more than 80% of our useres use this module ...

 

Just a simple stupid question: 

Why is the mail checked in account_pwa.php? Shouldn't be it up to the user to enter whatever mail he wants? What is with returning visitors? I am planning to make it more easy for custumers to checkout and I am thinking of removing the login modules by just using account_pwa. Of course, customers don't have so much overview about former orders but to be honest: the benefit of a faster and more efficient checkout with the possiblility to decrease the amount of abandoned orders compensates this for sure. In times of auto-filling forms it is faster to enter the address details then to remember a password. 

I recently made an order the same way - without the question of creating an account. It was extremely fast and I was able to track my orders via an unique key in the confirmation mail. 

So my question again: are there some problems in the background when one removes the check for existing mail addresses?

Thank you!

Share this post


Link to post
Share on other sites

Hello @cupidare,

I hope I understood your concerning about e-mail check.

The e-mail check in pwa_account.php allows to remove existing guest accounts with the same e-mail address. It can happen that a guest account is not auto deleted if the customer abandones the checkout process before arriving to checkout_success.php.

If you would remove the check, you would allow to exist multiple accounts with the same mail-address. I'm afraid this would break existing checks in other pages which use the customer account e-mail as a unique identifier for checks.

What's the harm to have this check in pwa_account.php?

Share this post


Link to post
Share on other sites

Thank you very much for the quick response. 

My problem is that when entering an email-address that already exists a warning appears that this mail already exists. That's the case when an registered user tries to pwa with the same address. 

That's why I wanted to remove the check. But now I understand the problem of duplicated accounts. 

What kind of checks depend on unique mail addresses? I already removed the necessity of logins for reviews and testimonials and replaced it by google capcha. 

Share this post


Link to post
Share on other sites
2 hours ago, cupidare said:

My problem is that when entering an email-address that already exists a warning appears that this mail already exists. That's the case when an registered user tries to pwa with the same address.

Then it's a special case for your store where you wish to do all purchases with PWA.

A better solution maybe to convert all existing accounts to guest accounts. Just update in the database the column "customer_guest" in the customers table to "1".

Then on a new pwa order the check in pwa_account.php will delete the old "regular" account as it identifies it now as a guest account.

Another solution would be to delete all existing accounts.

Edited by raiwa

Share this post


Link to post
Share on other sites

Update uploaded:

Purchase without account BS 3.0.5.

Changes Version. 3.0.5
- fix in admin/reviews.php to show guest reviews flagged. Thanks to @Demitry

Share this post


Link to post
Share on other sites

Using PWA 3.0.4 in 2.3.4.1 CE with PHP 7.0

Is it possible for a buyer to go thru Purchase Without Account and have separate billing and shipping addresses before finalizing their purchase?

Buyer reported problems with it.  She selects Purchase Without Account.  Fills out her billing details.

On the next screen (checkout_shipping) she sees the option to change the Shipping Address.  Selects that and fills out a new shipping address.  She wants this shipped to a friend.

Clicks continue (we're on checkout_payment now) and the shipping address box is once again populated with her original billing address, not the new shipping address she entered.

Is that the way this is supposed to work - because she's not a registered customer?  Or maybe I've done something wonky on my end, install-wise.

- Andrea

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hello Andrea @puggybelle,

There is something unclear in your report:

9 hours ago, puggybelle said:

On the next screen (checkout_shipping) she sees the option to change the Shipping Address.  Selects that and fills out a new shipping address.  She wants this shipped to a friend.

Clicks continue (we're on checkout_payment now) and the shipping address box is once again populated with her original billing address, not the new shipping address she entered.

If going to add a new shipping address in checkout shipping.php, the customer will be linked back first to the checkout shipping page where he sees the new shipping address. Then in the next step he will go to the checkout payment page and see the old (first) payment address. (shipping address is shown on checkout shipping, payment address is shown on checkout payment)

Anyway I would recommend you to check this yourself with a test guest order. I wouldn't believe too much in what customers report. Do it yourself and get familiar with the whole process and options.

In general for PWA:

The only differences between a guest and a regular account are:

- guest account has no password set

- guest account is flagged as guest account in the customer and order table in aditional columns

- once a customer leaves the checkout process without finishing and the session has expired, he can't log in again to the account, even the account has not been deleted (he has no password). But he can create again a new guest account without problems.

- guest checkout is auto deleted once the order is correct finished in checkout success (if the customer does not opt in to keep the account and set a password)

So all functionality like different shipping address etc. is exact the same like for regular accounts.

rgds
Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

I must have something wrong with my PWA setup because my checkout_payment.php is showing a box heading of Shipping Address instead of Billing Address.  My test site...which does not have PWA installed...is showing Billing Address.

That's where the confusion is coming from.  Off to fix it all...Thanks, @raiwa

- Andrea

 

Share this post


Link to post
Share on other sites

My initial post turned out to be a stupid goof on my end.  Not PWA related at all.

But, until I figured out what it was, I went thru the entire PWA contrib again just to make sure I had all I needed in place.

I never had made the edits recommended for those using PayPal Standard (yes, I do), so I did that and wanted to report back on what happened there.

My understanding is that you never were able to test it yourself, @raiwa as you don't have PP Standard in any of your shops.  So...here's what it's doing.

Firstly, the order process email it generates is terrific.  It removes the account_history link and all looks wonderful.

AND...it removed all traces of the customer from Admin > Customers so I did not have to delete them at all.  I'm not so sure that should be happening, as other customers are flagged in the Guest field with a green checkmark prior to editing the paypal_standard.php file.  But, for what it's worth...I like that.  I'd prefer if they did disappear after completing checkout.

Now the bad news:  The customer's name is not appearing in Admin.  When I visit mysite.com/admin - one of the first things appearing is the Orders section.  Notice the highlighted entry below - their name is missing.

orders.PNG.bfd218f3e249124036eda905909ed462.PNG

I always include a Packing Slip with orders, and that slip (along with the Invoice option) is not populating the Sold To field.

1766230865_packingslip.PNG.1afe3fe1df88887772bedc72cb16f656.PNG

But, the biggest headache of all comes when I try to update their order status to Shipped which sends an email to the customer.

It bounces back to me immediately as undeliverable because there is no email address associated with the order.

Quote

A message that you sent contained one or more recipient addresses that were
incorrectly constructed:

  " " <>: missing or malformed local part

This address has been ignored. There were no other addresses in your
message, and so no attempt at delivery was possible.

So, I have reverted back to my original paypal_standard.php file - using the app, 5.0.18

I'm either using Edge or Frozen...not at all sure which.  But, I thought I would just pass this on as those edits to the PayPal file turned out to be problematic.

Still keeping Purchase Without Account, though.  :)

- Andrea

Share this post


Link to post
Share on other sites
Posted (edited)

Hello Andrea @puggybelle,

I'm pretty sure that this is again unrelated to PWA.

The missing customer address, e-mail and phone is stored in the order tables and independant from the customers account data which is stored (and deleted by PWA) in the customers and address-book tables.

The error you get trying to send a status update is because there is no e-mail address stored in the order like I can see in your screenshot. No e-mail address, no mail can be send.

PWA and the modifications in paypal standard do not interfere in any way how the order data is stored, so it can't be the reason for this problem. If correct installed, PWA only modifies the content of the order confirmation mail and flaggs the order as a guest order, nothing else.

The fact that guest accounts are auto deleted on successful checkout is one of main features and it makes sense. It is just what customers using guest checkout like. Only the strictly required order data is kept stored.

Please revise your store and check again your modifications.

Best regards
Rainer

PS: Please consider also that PWA guest checkout is published since years and for sure used in hundreds of stores. No one else has reported something similar yet.

Edited by raiwa

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

×