Jump to content
Latest News: (loading..)
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

By any chance, does your STORE_OWNER_EMAIL_ADDRESS contain a period? Such as "First.Last@Domain.com"?

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

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


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release 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

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

×