Jump to content
ArtcoInc

Purchase without account for 2.3.4 and BS2334

Recommended Posts

Hello @raiwa

$set_passw_url and $set_password_email_text are from PWA?

I must to delete this from checkout_process.php?

// PWA guest checkout
  $OSCOM_Hooks->register('pwa');

Thanks :)

Share this post


Link to post
Share on other sites

Hello @PiLLaO,

$set_passw_url and $set_password_email_text are core and used by the set password mecanism for accounts created by PayPal express guest checkout. Nothing to do with PWA. I do not remember if I added this because it was missing, it is not included in the original files?

I attached all 3 complete files, there is also discount codes support included. But please check, maybe there are more modifications for my store. I's so long time since I did it, I do not remember.

All hook calls for PWA  on checkout_process.php can be left out. They are replaced by the modifications in the html mail page files.

 

hope it works

un saludo

Rainer

tp_email_checkout_process.php

email_checkout_process_html.php

email_checkout_process_text.php

Share this post


Link to post
Share on other sites

No, aren't included hehehe.

I check your files for if I use the discount options in email on the future.

Thank you so much Rainer :)

 

 

Share this post


Link to post
Share on other sites

@raiwa

Looking at the process of the PWA module, I was under the impression that the customer details were not stored in the customer table, that is, the row in the table was deleted after the purchase.  It looks as though this is not the case on my shop.

Is this assumption correct? If so, were is the code to delete the customer details after purchase.  I've looked put not getting where.

 

Hope you can help?

Mike


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

Share this post


Link to post
Share on other sites

Hello Mike @Mikepo,

 

The guest accounts are deleted in the ht_delete_guest_account.php header tag module, always if:

1. the customer finishes the purchase in checkout_success.php and goes one page ahead.

2. he doesn't tick the keep account option if it is offered

Anyway, if the guest account is not deleted , which is possible if they don't come back to checkout success or do not go one page ahead, a check is performed if he tries to register again as guest or regular customer, and the old guest data is auto deleted. So it shouldn't be a problem at all even the data is still stored in the database.

 

Of course, the header tag and all other PWA modules need to be installed.

Go back in this thread and you'll find more info about the subject.

 

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hi Rainer @raiwa

I just managed to understand, as your post arrived.  I had a ht module (from Burt) which checks if an email address exists, and if so, directs them to the login page.  This I had activated on the account_pwa page which was confusing me. So I removed it from the account_pwa page, now it should work OK.

thanks for your quick response

Mike


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

Share this post


Link to post
Share on other sites

Hi Rainer @raiwa

Is possible that this if say false if my customers use a guest account?

    if ( (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True') && (basename($PHP_SELF) == FILENAME_CHECKOUT_SUCCESS) && tep_session_is_registered('customer_id')

This code is part of Google Analitycs - Header Tags module present in 2.3.4 BS

Regards

Share this post


Link to post
Share on other sites

Yes,

This code in ht_pwa_delete_guest_account.php header tags modules seems to delete de account before to read the "if" that I put in my previous comment.

      // do things if a guest comes from checkout success
 	    if ( tep_session_is_registered('customer_is_guest') && isset($navigation->snapshot) && $navigation->snapshot['page'] == 'checkout_success.php' ) {
        if ( defined('MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT') && MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT == 'True' && 
             basename($PHP_SELF) == 'account.php' && strpos($messageStack->output('account'), 'alert-success') ) { 
          // Unregister and remove guest from customers table if password is successful set
          tep_session_unregister('customer_is_guest');
          tep_db_query("update customers set customers_guest = '0' where customers_id = '" . (int)$customer_id . "'");
        } elseif ( basename($PHP_SELF) != 'download.php' && basename($PHP_SELF) != 'set_password.php' && substr(basename($PHP_SELF), 0, 8) != 'checkout' ) {
          // else delete guest account
 	        tep_db_query("delete from customers where customers_id = '" . (int)$customer_id . "' and customers_guest = '1'");
          tep_db_query("delete from address_book where customers_id = '" . (int)$customer_id . "'");
          tep_db_query("delete from customers_info where customers_info_id = '" . (int)$customer_id . "'");
  
          tep_session_unregister('customer_default_address_id');
          tep_session_unregister('customer_first_name');
          tep_session_unregister('customer_country_id');
          tep_session_unregister('customer_zone_id');
          tep_session_unregister('customer_id');
          tep_session_unregister('customer_is_guest');
        }
 
      }

 

So, if a guest customer make an order, the ecommerce date to Google Analytics don't recibe the data because don't enter in the "if"

Best Regards

Share this post


Link to post
Share on other sites

Hola Gustave @PiLLaO,

I answer you by memory, but if I'm not wrong, both ht modules are used on the checkout_success page. So if you change the sort order to be google analytics executed before delete guest, analytics data should be transfered.

rgds

Rainer

Share this post


Link to post
Share on other sites

I installed Purchase without Account for Bootstrap-Gold because I thought it was the latest PWA for my upgrade to 2.3.4.1 but after finding this thread, I see there is a version of PWA that has the ability for guests to also write reviews without creating an account.

Can I add this function to the version of PWA that I have, or should I scrap it, uninstall and start over with PWA for BS 2.4 with review support added?

Thanks in advance  for your time, whoever might answer..........

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
8 hours ago, raiwa said:

You should start over

Thanks, am I correct that the one to use, if I want guest reviews and am currently running 2.3.4.1BS is PWA for BS 2.5 r1?

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
8 hours ago, raiwa said:

Yes, that's it

Cool, thanks......

A little confusion, though, on the admin/orders instructions. The instructions say:

/admin/orders.php (use for stores without PayPalApp)
/admin/orders(PayPalApp).php (use and rename to "orders.php" for stores with PayPalApp installed)


But the actual files are named:

orders.php

and

orders(NoPayPalApp).php

 

I don't use Paypal, which one do I use?  That second one should be named orders(PayPalApp).php if it has PayPal, but it says NoPayPal, so I'm confused.

 

I have tried both files, and either way, I get an error in admin/orders.php that says:

Warning: constant(): Couldn't find constant MODULE_CONTENT_PWA_GUEST_ENGLISH in /home/tightro8/public_html/dynamo/dynamoadmin/orders.php on line 356 (or 480 depending on which file I have uploaded)

And that line in the code is:  <td class="dataTableHeadingContent" align="right"><?php echo constant('MODULE_CONTENT_PWA_GUEST_' . strtoupper($language)); ?></td>

 

And I have no idea what that means.........Any suggestions?

Thanks

brian

 

Share this post


Link to post
Share on other sites

And when I try to make an order, this is what I get on checkout_process.php:

Warning: constant(): Couldn't find constant MODULE_CONTENT_PWA_REVIEWS_ENGLISH in /home/tightro8/public_html/dynamo/includes/hooks/shop/checkout_process/pwa.php on line 25

Warning: constant(): Couldn't find constant MODULE_CONTENT_PWA_EMAIL_WARNING_ENGLISH in /home/tightro8/public_html/dynamo/includes/hooks/shop/checkout_process/pwa.php on line 29
1054 - Unknown column 'reviews_key' in 'field list'

update orders set reviews_key = 'mTZMsWB4Gwr8' where customers_id = '35' and orders_id = '17'

[TEP STOP]

------------------------------------------

And those two lines are:

LINE 25:

$products_review_links = constant('MODULE_CONTENT_PWA_REVIEWS_' . strtoupper($language)) . "\n";


LINE 29:

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

Since I'm setting up a new store, I just copied files over, I'm sure I screwed up something, but it's lkate, maybe I'll scrub everything and start over tomorrow.

Share this post


Link to post
Share on other sites

HelloBrian @brian_cee,

For orders-php and PayPal App:

  • the filename is correct, the error is in the instructions, I'll fix this in the next update, sorry.
  • the criteria is not if you use PayPal, the criteria is if your osc version includes the PayPal App to determine which orders.php version fits your store.
  • if your version is 2.3.4.1 it uses PayPalApp and you should use the file named orders.php
  • you could find this out comparing the modified orders.php with your original orders-php

For the error messages:

  • you missed to install the module: Admin =>Modules => Content[login]
  • please read and follow the instructions point 3-9

best regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Thanks, I'll look into that....Also, after I uploaded everything, there was still a file not mentioned in the install instructions: includes/languages/english/account_pwa.php

I didn't know what to do with it, so I just uploaded it as it was, was that OK?

Thanks again..........

Share this post


Link to post
Share on other sites
2 minutes ago, raiwa said:

yes, sure, i'll fix this too

I read a few pages ago on this thread where someone mentioned that, and I think you said that was going to be deleted and just dealt with in the create_account.php language file or something, I didn't understand it.......

Share this post


Link to post
Share on other sites

for now the language file is still needed. See in account_pwa.php:

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

 

Share this post


Link to post
Share on other sites
13 hours ago, raiwa said:

HelloBrian @brian_cee,

 

For the error messages:

  • you missed to install the module: Admin =>Modules => Content[login]
  • please read and follow the instructions point 3-9

best regards

Rainer

Unfortunately, I did install both of the Admin=>Modules=>Content as well as the Admin=>Modules=>Header tags, and all three are set to true, and I followed all of the instructions from 3-9, and cleared my browser and tried different browsers, etc, and all of the errors are still there.

And in Admin, Orders, I get this by that checkbox:
Warning: constant(): Couldn't find constant MODULE_CONTENT_PWA_REVIEWS_STATUS_ENGLISH in /home/tightro8/public_html/dynamo/dynamoadmin/orders.php on line 390

If I click the check box anyway and update the order, I get a blank white page with just this:

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

select customers_name, customers_guest, reviews_key, customers_email_address, orders_status, date_purchased from orders where orders_id = '23'

[TEP STOP]

 

I hate to be a soup sandwich, but I followed everything, uploaded everything, installed everything, and it's still like this.

Any ideas what I could do?

If so, thanks in advance........

Share this post


Link to post
Share on other sites

Please check the file: includes/modules/content/login/cm_pwa_login.php for the right version, it should be labelled 2.4r1 BS or show in admin 2.4 BS.

If not, you may have missed to upload and replace an older version you had installed before.

If you are not sure, please post your file: includes/modules/content/login/cm_pwa_login.php and a screenshot of this installed module in admin

You should have these lines of code (line 100-139) in the file which are related to the reported errors:

      include_once('includes/classes/language.php');
      $lng = new language;
      while (list($id, $value) = each($lng->catalog_languages)) {
      	$key = strtoupper($value['directory']);
        switch ($key) {
        	case 'ESPANOL':        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota e-mail " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'NOTA: Esta dirección de correo electrónico ha sido enviado por un visitante de nuestra tienda online. Si no fuera este visitante, por favor, envíe un mensaje a: " . STORE_OWNER_EMAIL_ADDRESS . ". Gracias por su compra y tenga un buen día.', 'Definición de idioma usado en checkout_process.php', '6', '13', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota pedidos virtuales " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Si tiene alguna dificultad para descargar el producto comprado, por favor, contáctenos en nuestra página de, <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contacto</a>.', 'Definición de idioma usado en \"Checkout Success\" y Correo de confirmación de pedido si incluye productos virtuales.', '6', '13', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Invitado', 'Definición de idioma usado en admin/orders.php', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado Valoración de Producto " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Nos gustaría pedirle escribir una valoración de los productos que ha comprado', 'Definición de idioma usado en correo confirmación y actualización de estado de pedido.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Valoración Status Update Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Añadir enlaces a valoración de producto ', 'Definición de idioma usado en Admin/Pedidos.', '6', '14', now())");
       		break;
        	case 'GERMAN':        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung E-Mail Hinweis " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'Achtung: Diese Email-Adresse wurde uns von einem Besucher unseres Online-Shops übermittelt. Falls Sie nicht dieser Besucher waren, senden Sie bitte eine Mitteilung an:  " . STORE_OWNER_EMAIL_ADDRESS . ".', 'Sprachdefinition für checkout_process.php', '6', '19', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung Hinweis bei virtuellen Produkten" . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Wenn Sie Schwierigkeiten haben das gekaufte Produkt herunterzuladen, kontaktieren Sie uns bitte auf unserer <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Kontakt</a> Seite', 'Sprachdefinition für \"Checkout Success\" und Bestätigungs Mail bei virtuellen Produkten.', '6', '19', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Gast', 'Sprachdefinition für admin/orders.php', '6', '20', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast-Produktbewertung " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Wir möchten Sie bitten eine Bewertung der gekauften Artikel zu schreiben', 'Sprachdefinition Producktbewertung für Bestätigungs Mail und Statusänderungsmail.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Producktbewertung Status Aktualisierung Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Links zur Producktbewertung hinzufügen ', 'Sprachdefinition Producktbewertung in Admin Bestellungen.', '6', '14', now())");
            break;
        	default:        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order e-mail warning " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', '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.', 'Language definition used in checkout_process.php', '6', '25', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order note for virtual products " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'If you experience any difficulty to download the purchased product, please contact us on our <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contact Us</a> page', 'Language definition used in  \"Checkout Success\" and Order confirmation Mail if virtual products are included.', '6', '25', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Guest', 'Language definition used in admin/orders.php', '6', '26', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest Product Review " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'We would like to ask you to leave a review of the products you have purchased', 'Language definition used in order confirmation mail and status update mail.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Reviews for Status Update in Admin Orders " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Add links to produckt reviews ', 'Language definition used in Admin Orders.', '6', '14', now())");
        }
      }
      
      tep_db_query("alter table address_book add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_id`");
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table orders add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_address_format_id`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'reviews_key'")) != 1 ) {
        tep_db_query("alter table orders add column `reviews_key` VARCHAR(12) NOT NULL DEFAULT '0' AFTER `customers_guest`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='reviews' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table reviews add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_name`");
      }
      tep_db_query("alter table customers add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_newsletter`");
    }

 

Edited by raiwa

Share this post


Link to post
Share on other sites
30 minutes ago, raiwa said:

Please check the file: includes/modules/content/login/cm_pwa_login.php for the right version, it should be labelled 2.4r1 BS or show in admin 2.4 BS.

If not, you may have missed to upload and replace an older version you had installed before.

If you are not sure, please post your file: includes/modules/content/login/cm_pwa_login.php and a screenshot of this installed module in admin

You should have these lines of code (line 100-139) in the file which are related to the reported errors:


      include_once('includes/classes/language.php');
      $lng = new language;
      while (list($id, $value) = each($lng->catalog_languages)) {
      	$key = strtoupper($value['directory']);
        switch ($key) {
        	case 'ESPANOL':        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota e-mail " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'NOTA: Esta dirección de correo electrónico ha sido enviado por un visitante de nuestra tienda online. Si no fuera este visitante, por favor, envíe un mensaje a: " . STORE_OWNER_EMAIL_ADDRESS . ". Gracias por su compra y tenga un buen día.', 'Definición de idioma usado en checkout_process.php', '6', '13', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota pedidos virtuales " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Si tiene alguna dificultad para descargar el producto comprado, por favor, contáctenos en nuestra página de, <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contacto</a>.', 'Definición de idioma usado en \"Checkout Success\" y Correo de confirmación de pedido si incluye productos virtuales.', '6', '13', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Invitado', 'Definición de idioma usado en admin/orders.php', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado Valoración de Producto " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Nos gustaría pedirle escribir una valoración de los productos que ha comprado', 'Definición de idioma usado en correo confirmación y actualización de estado de pedido.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Valoración Status Update Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Añadir enlaces a valoración de producto ', 'Definición de idioma usado en Admin/Pedidos.', '6', '14', now())");
       		break;
        	case 'GERMAN':        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung E-Mail Hinweis " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'Achtung: Diese Email-Adresse wurde uns von einem Besucher unseres Online-Shops übermittelt. Falls Sie nicht dieser Besucher waren, senden Sie bitte eine Mitteilung an:  " . STORE_OWNER_EMAIL_ADDRESS . ".', 'Sprachdefinition für checkout_process.php', '6', '19', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung Hinweis bei virtuellen Produkten" . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Wenn Sie Schwierigkeiten haben das gekaufte Produkt herunterzuladen, kontaktieren Sie uns bitte auf unserer <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Kontakt</a> Seite', 'Sprachdefinition für \"Checkout Success\" und Bestätigungs Mail bei virtuellen Produkten.', '6', '19', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Gast', 'Sprachdefinition für admin/orders.php', '6', '20', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast-Produktbewertung " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Wir möchten Sie bitten eine Bewertung der gekauften Artikel zu schreiben', 'Sprachdefinition Producktbewertung für Bestätigungs Mail und Statusänderungsmail.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Producktbewertung Status Aktualisierung Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Links zur Producktbewertung hinzufügen ', 'Sprachdefinition Producktbewertung in Admin Bestellungen.', '6', '14', now())");
            break;
        	default:        
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order e-mail warning " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', '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.', 'Language definition used in checkout_process.php', '6', '25', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order note for virtual products " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'If you experience any difficulty to download the purchased product, please contact us on our <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contact Us</a> page', 'Language definition used in  \"Checkout Success\" and Order confirmation Mail if virtual products are included.', '6', '25', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Guest', 'Language definition used in admin/orders.php', '6', '26', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest Product Review " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'We would like to ask you to leave a review of the products you have purchased', 'Language definition used in order confirmation mail and status update mail.', '6', '14', now())");
        		tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Reviews for Status Update in Admin Orders " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Add links to produckt reviews ', 'Language definition used in Admin Orders.', '6', '14', now())");
        }
      }
      
      tep_db_query("alter table address_book add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_id`");
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table orders add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_address_format_id`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'reviews_key'")) != 1 ) {
        tep_db_query("alter table orders add column `reviews_key` VARCHAR(12) NOT NULL DEFAULT '0' AFTER `customers_guest`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='reviews' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table reviews add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_name`");
      }
      tep_db_query("alter table customers add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_newsletter`");
    }

 

Here is that file, screen shot to follow in a minute:

<?php
/*
  $Id$

  Purchase without Account for Bootstrap
  Version 2.4r1 BS
  by @raiwa
  info@oscaddons.com
  www.oscaddons.com

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/

  class cm_pwa_login {
    var $code;
    var $group;
    var $title;
    var $description;
    var $sort_order;
    var $enabled = false;

    function __construct() {
      $this->code = get_class($this);
      $this->group = basename(dirname(__FILE__));

      $this->title = MODULE_CONTENT_PWA_LOGIN_TITLE;
      $this->description = MODULE_CONTENT_PWA_LOGIN_DESCRIPTION;

      if ( defined('MODULE_CONTENT_PWA_LOGIN_STATUS') ) {
        $this->sort_order = MODULE_CONTENT_PWA_LOGIN_SORT_ORDER;
        $this->enabled = (MODULE_CONTENT_PWA_LOGIN_STATUS == 'True');
      }
      
      if (!defined('MODULE_HEADER_TAGS_DELETE_GUEST_ACCOUNT_STATUS') || defined('MODULE_HEADER_TAGS_DELETE_GUEST_ACCOUNT_STATUS') && MODULE_HEADER_TAGS_DELETE_GUEST_ACCOUNT_STATUS != 'True' ) {
        $this->description = '<div class="secWarning">' .
                                 MODULE_CONTENT_PWA_LOGIN_HT_MODULE_WARNING .
                             '  <a href="modules.php?set=header_tags&module=ht_pwa_delete_guest_account&action=install">' . MODULE_CONTENT_PWA_LOGIN_INSTALL_NOW . '</a>
                             </div>' .
                             $this->description;
      }
      if (!defined('MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_PRODUCTS_PURCHASED_STATUS') || defined('MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_PRODUCTS_PURCHASED_STATUS') && MODULE_CONTENT_CHECKOUT_SUCCESS_PWA_PRODUCTS_PURCHASED_STATUS != 'True' ) {
        $this->description = '<div class="secWarning">' .
                                 MODULE_CONTENT_PWA_LOGIN_CHECKOUT_SUCCESS_PWA_WARNING .
                             '  <a href="modules_content.php?module=cm_cs_pwa_products_purchased&action=install">' . MODULE_CONTENT_PWA_LOGIN_INSTALL_NOW . '</a>
                             </div>' .
                             $this->description;
      }
      if (defined('MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT') && MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT == 'True' && !defined('MODULE_CONTENT_ACCOUNT_SET_PASSWORD_STATUS') || defined('MODULE_CONTENT_ACCOUNT_SET_PASSWORD_STATUS') && MODULE_CONTENT_ACCOUNT_SET_PASSWORD_STATUS != 'True' ) {
        $this->description = '<div class="secWarning">' .
                                 MODULE_CONTENT_PWA_LOGIN_ACCOUNT_SET_PASSWORD_WARNING .
                             '  <a href="modules_content.php?module=cm_account_set_password&action=install">' . MODULE_CONTENT_PWA_LOGIN_INSTALL_NOW . '</a>
                             </div>' .
                             $this->description;
      }
    }

    function execute() {
      global $oscTemplate, $language;


      ob_start();
      include('includes/modules/content/' . $this->group . '/templates/pwa_login.php');
      $template = ob_get_clean();

      $oscTemplate->addContent($template, $this->group);
            
    }
    function isEnabled() {
      global $cart;
      $cart->content_type = $cart->get_content_type();
      if (!tep_session_is_registered('customer_id') && ($cart->count_contents() > 0) && (MODULE_CONTENT_PWA_LOGIN_STATUS == 'True') && (MODULE_CONTENT_PWA_LOGIN_VIRTUAL == 'True' || $cart->content_type == 'physical') ) {
            return $this->enabled;
        } else {
            $this->enabled = false;
        }
   }

    function check() {
      return defined('MODULE_CONTENT_PWA_LOGIN_STATUS');
    }

    function install() {
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Current Version', 'MODULE_CONTENT_PWA_LOGIN_VERSION', '2.4 BS', 'Version info. It is read only.', '6', '1', 'tep_version_readonly(', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Login Form Module', 'MODULE_CONTENT_PWA_LOGIN_STATUS', 'True', 'Do you want to enable the login form module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_PWA_LOGIN_CONTENT_WIDTH', 'Half', 'Should the content be shown in a full or half width container?', '6', '2', 'tep_cfg_select_option(array(\'Full\', \'Half\'), ', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Uninstall Remove Database columns', 'MODULE_CONTENT_PWA_LOGIN_REMOVE_DATA', 'False', 'Do you want to remove the pwa guest flag column when uninstall the module? (Guest orders will not be deleted, but will loose their guest order flags)', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_PWA_LOGIN_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '4', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, `set_function`) values ('Require Telephone Number', 'GUEST_CHECKOUT_TELEPHONE', 'True', 'Require Telephone Number?', 6, 5, '', now(),  'tep_cfg_select_option(array(\'True\', \'False\'),')");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, `set_function`) values ('Offer set password to guest', 'MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT', 'True', 'Do you wish to offer keep account and set password in checkout success page?', 6, 6, '', now(),  'tep_cfg_select_option(array(\'True\', \'False\'),')");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, `set_function`) values ('Allow guest checkout for virtual products', 'MODULE_CONTENT_PWA_LOGIN_VIRTUAL', 'False', 'Do you wish to allow guest checkout for orders containing virtual-downloadable products.<br>Also applies for mixed orders.', 6, 7, '', now(),  'tep_cfg_select_option(array(\'True\', \'False\'),')");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Exclude Payment Modules for Virtual Guest Orders', 'MODULE_CONTENT_PWA_LOGIN_PAYMENT_MODULES', '', 'The payment modules to exclude for guests and orders including virtual (downloadable) products.<br>Needs payment class to be modified, see Instructions Step 2.4.<br>Adding a new payment module, requires un-reinstall this module to update this list.', '6', '8', 'cm_pwa_login_show_payment_modules', 'cm_pwa_login_edit_payment_modules(', now())");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, `set_function`) values ('Add Review Links to Guest Order Mail', 'MODULE_CONTENT_PWA_LOGIN_CHECKOUT_GUEST_REVIEW_LINKS', 'True', 'Do you wish to add a list with all products linked to the write review pages to the order confirmation Mail for guests?', 6, 7, '', now(),  'tep_cfg_select_option(array(\'True\', \'False\'),')");
      tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, `set_function`) values ('Add Review Links to Standard Order Mail', 'MODULE_CONTENT_PWA_LOGIN_CHECKOUT_REGISTERED_REVIEW_LINKS', 'True', 'Do you wish to add a list with all products linked to the write review pages to the order confirmation Mail for registered customers?', 6, 7, '', now(),  'tep_cfg_select_option(array(\'True\', \'False\'),')");

      include_once('includes/classes/language.php');
      $lng = new language;
      while (list($id, $value) = each($lng->catalog_languages)) {
          $key = strtoupper($value['directory']);
        switch ($key) {
            case 'ESPANOL':        
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota e-mail " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'NOTA: Esta dirección de correo electrónico ha sido enviado por un visitante de nuestra tienda online. Si no fuera este visitante, por favor, envíe un mensaje a: " . STORE_OWNER_EMAIL_ADDRESS . ". Gracias por su compra y tenga un buen día.', 'Definición de idioma usado en checkout_process.php', '6', '13', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pedido Invitado Nota pedidos virtuales " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Si tiene alguna dificultad para descargar el producto comprado, por favor, contáctenos en nuestra página de, <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contacto</a>.', 'Definición de idioma usado en \"Checkout Success\" y Correo de confirmación de pedido si incluye productos virtuales.', '6', '13', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Invitado', 'Definición de idioma usado en admin/orders.php', '6', '14', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invitado Valoración de Producto " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Nos gustaría pedirle escribir una valoración de los productos que ha comprado', 'Definición de idioma usado en correo confirmación y actualización de estado de pedido.', '6', '14', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Valoración Status Update Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Añadir enlaces a valoración de producto ', 'Definición de idioma usado en Admin/Pedidos.', '6', '14', now())");
               break;
            case 'GERMAN':        
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung E-Mail Hinweis " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', 'Achtung: Diese Email-Adresse wurde uns von einem Besucher unseres Online-Shops übermittelt. Falls Sie nicht dieser Besucher waren, senden Sie bitte eine Mitteilung an:  " . STORE_OWNER_EMAIL_ADDRESS . ".', 'Sprachdefinition für checkout_process.php', '6', '19', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gastbestellung Hinweis bei virtuellen Produkten" . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'Wenn Sie Schwierigkeiten haben das gekaufte Produkt herunterzuladen, kontaktieren Sie uns bitte auf unserer <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Kontakt</a> Seite', 'Sprachdefinition für \"Checkout Success\" und Bestätigungs Mail bei virtuellen Produkten.', '6', '19', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Gast', 'Sprachdefinition für admin/orders.php', '6', '20', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Gast-Produktbewertung " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'Wir möchten Sie bitten eine Bewertung der gekauften Artikel zu schreiben', 'Sprachdefinition Producktbewertung für Bestätigungs Mail und Statusänderungsmail.', '6', '14', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Producktbewertung Status Aktualisierung Admin " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Links zur Producktbewertung hinzufügen ', 'Sprachdefinition Producktbewertung in Admin Bestellungen.', '6', '14', now())");
            break;
            default:        
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order e-mail warning " . $key . "', 'MODULE_CONTENT_PWA_EMAIL_WARNING_" . $key . "', '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.', 'Language definition used in checkout_process.php', '6', '25', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest order note for virtual products " . $key . "', 'MODULE_CONTENT_PWA_DOWNLOAD_" . $key . "', 'If you experience any difficulty to download the purchased product, please contact us on our <a class=\"btn btn-info\" role=\"button\" href=\"" . tep_catalog_href_link('contact_us.php') . "\">Contact Us</a> page', 'Language definition used in  \"Checkout Success\" and Order confirmation Mail if virtual products are included.', '6', '25', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest " . $key . "', 'MODULE_CONTENT_PWA_GUEST_" . $key . "', 'Guest', 'Language definition used in admin/orders.php', '6', '26', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Guest Product Review " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_" . $key . "', 'We would like to ask you to leave a review of the products you have purchased', 'Language definition used in order confirmation mail and status update mail.', '6', '14', now())");
                tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Reviews for Status Update in Admin Orders " . $key . "', 'MODULE_CONTENT_PWA_REVIEWS_STATUS_" . $key . "', 'Add links to produckt reviews ', 'Language definition used in Admin Orders.', '6', '14', now())");
        }
      }
      
      tep_db_query("alter table address_book add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_id`");
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table orders add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_address_format_id`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='orders' and column_name like 'reviews_key'")) != 1 ) {
        tep_db_query("alter table orders add column `reviews_key` VARCHAR(12) NOT NULL DEFAULT '0' AFTER `customers_guest`");
      }
      if (tep_db_num_rows(tep_db_query("select * from information_schema.columns where table_schema='". DB_DATABASE . "' and table_name='reviews' and column_name like 'customers_guest'")) != 1 ) {
        tep_db_query("alter table reviews add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_name`");
      }
      tep_db_query("alter table customers add column `customers_guest` INT(1) NOT NULL DEFAULT '0' AFTER `customers_newsletter`");
    }

    function remove() {
      tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')");
      tep_db_query("alter table address_book drop `customers_guest`");
      tep_db_query("alter table customers drop `customers_guest`");
      if ( defined('MODULE_CONTENT_PWA_LOGIN_REMOVE_DATA') && MODULE_CONTENT_PWA_LOGIN_REMOVE_DATA == 'True' ) {
        tep_db_query("alter table orders drop `customers_guest`");
        tep_db_query("alter table orders drop `reviews_key`");
        tep_db_query("alter table reviews drop `customers_name`");
      }
    }

    function keys() {
      include_once('includes/classes/language.php');
      $lng = new language;
      $KeysArray = array('MODULE_CONTENT_PWA_LOGIN_VERSION',
                         'MODULE_CONTENT_PWA_LOGIN_STATUS',
                         'MODULE_CONTENT_PWA_LOGIN_CONTENT_WIDTH',
                         'MODULE_CONTENT_PWA_LOGIN_REMOVE_DATA',
                         'MODULE_CONTENT_PWA_LOGIN_SORT_ORDER',
                         'GUEST_CHECKOUT_TELEPHONE',
                         'MODULE_CONTENT_PWA_LOGIN_KEEP_ACCOUNT',
                         'MODULE_CONTENT_PWA_LOGIN_VIRTUAL',
                         'MODULE_CONTENT_PWA_LOGIN_PAYMENT_MODULES',
                         'MODULE_CONTENT_PWA_LOGIN_CHECKOUT_GUEST_REVIEW_LINKS',
                         'MODULE_CONTENT_PWA_LOGIN_CHECKOUT_REGISTERED_REVIEW_LINKS');      
      while (list($id, $value) = each($lng->catalog_languages)) {
          $key = strtoupper($value['directory']);
          array_push($KeysArray, 'MODULE_CONTENT_PWA_EMAIL_WARNING_' . $key);
          array_push($KeysArray, 'MODULE_CONTENT_PWA_DOWNLOAD_' . $key);
          array_push($KeysArray, 'MODULE_CONTENT_PWA_GUEST_' . $key);
          array_push($KeysArray, 'MODULE_CONTENT_PWA_REVIEWS_' . $key);
          array_push($KeysArray, 'MODULE_CONTENT_PWA_REVIEWS_STATUS_' . $key);
      }
      return $KeysArray;
    }
  }

 
// wholesaler_payment_modules Begin    
  function cm_pwa_login_show_payment_modules($text) {
    return nl2br(implode("\n", explode(';', $text)));
  }

  function cm_pwa_login_edit_payment_modules($values, $key) {
    global $PHP_SELF;

    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $files_array = array();
      if ($dir = @dir(DIR_FS_CATALOG . 'includes/modules/payment/')) {
        while ($file = $dir->read()) {
          if (!is_dir(DIR_FS_CATALOG . 'includes/modules/payment/' . $file)) {
            if (substr($file, strrpos($file, '.')) == $file_extension) {
            $files_array[] = $file;
          }
        }
      }
      sort($files_array);
      $dir->close();
    }

    $values_array = explode(';', $values);
    $installed_values = explode(';', MODULE_PAYMENT_INSTALLED);

    $output = '';
    foreach ($files_array as $file) {
        if ( in_array($file, $installed_values ) ) {
            $output .= tep_draw_checkbox_field('cm_pwa_payment_module[]', $file, in_array($file, $values_array), null, True) . '&nbsp;' . tep_output_string($file) . '<br />';
        }
    }

    if (!empty($output)) {
      $output = '<br />' . substr($output, 0, -6);
    }

    $output .= tep_draw_hidden_field('configuration[' . $key . ']', '', 'id="htrn_cm_pwa_payment_modules"');

    $output .= '<script>
                function htrn_cm_pwa_payment_update_cfg_value() {
                  var htrn_cm_pwa_payment_selected_modules = \'\';

                  if ($(\'input[name="cm_pwa_payment_module[]"]\').length > 0) {
                    $(\'input[name="cm_pwa_payment_module[]"]:checked\').each(function() {
                      htrn_cm_pwa_payment_selected_modules += $(this).attr(\'value\') + \';\';
                    });

                    if (htrn_cm_pwa_payment_selected_modules.length > 0) {
                      htrn_cm_pwa_payment_selected_modules = htrn_cm_pwa_payment_selected_modules.substring(0, htrn_cm_pwa_payment_selected_modules.length - 1);
                    }
                  }

                  $(\'#htrn_cm_pwa_payment_modules\').val(htrn_cm_pwa_payment_selected_modules);
                }

                $(function() {
                  htrn_cm_pwa_payment_update_cfg_value();

                  if ($(\'input[name="cm_pwa_payment_module[]"]\').length > 0) {
                    $(\'input[name="cm_pwa_payment_module[]"]\').change(function() {
                      htrn_cm_pwa_payment_update_cfg_value();
                    });
                  }
                });
                </script>';

    return $output;
  }
// wholesaler_payment_modules End

// function show the version read only  
  if(!function_exists('tep_version_readonly')) {
      function tep_version_readonly($value){
          $version_text = '<br>Version ' . $value;
      return $version_text;
    }
  }

?>

Share this post


Link to post
Share on other sites

it seems the right version.

Can you also check if in your database table "orders" the column " reviews_key" exists.

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

×