Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Purchase Without Account Updated & Admin Functionality


Guest

Recommended Posts

The latest in my saga. I now have it working but I am not absolutely sure what is the best fix.

 

By outputting the session variables I can see that there is a session variable noaccount that is set in order_info_process.php. The value of this variable is empty.

 

It does this by calling tep_session_register('noaccount'), a function in the sessions.php file.

 

It is set to nothing (empty quotes).

 

The conditional statements that were the problem tested the existence of the session variable thus:

 

if (tep_session_is_registered('noaccount')), which in turn uses the isset function to return true or false.

 

The problem is that it only returns true if the $_SESSION variable has a value and although $_SESSION['noaccount'] was set it had no value.

 

By enterring the line $_SESSION['noaccount'] = '1' I have given it a value and now all the isset tests return true (i.e. no sign out etc. and all releavnt deletes are done).

 

e.g. ..at the end of the order_info_process.php file I have added one line after the session var is registerred to assign the value:

	tep_session_register('noaccount');
$_SESSION['noaccount'] = '1';

 

The question is why do I have to do this? This is the limit of my php as I have not played with sessions much.

 

It works now, but I'd be interested in a better explanation from someone on a better fix!

 

(I should note that I am using the register_globals contribution and the session functions are from that, pasted here for completeness...)

 

  function tep_session_register($variable) {
   global $session_started;
// >>> BEGIN REGISTER_GLOBALS
   $success = false;

   if ($session_started == true) {
// -skip-   return session_register($variable);
//    } else {
   //  return false;
   //}
   // Work-around to allow disabling of register_globals - map session variable
     link_session_variable($variable, true);
     $success = true;
   }
   return $success;
// <<< END SESSION_REGISTER
 }

 function tep_session_is_registered($variable) {
// >>> BEGIN REGISTER_GLOBALS
//    return session_is_registered($variable);
   return isset($_SESSION[$variable]);
// <<< END REGISTER_GLOBALS
 }

 // >>> BEGIN REGISTER_GLOBALS - new function <<<
 // Work-around function to allow disabling of register_globals in php.ini
 // This is pretty crude but it works. What it does is map session variables to
 // a corresponding global variable.
 // In this way, the main application code can continue to use the existing
 // global varaible names but they are actually redirected to the real session
 // variables
 //
 // If the global variable is already set with a value at the time of the mapping
 // then it is copied over to the real session variable before being mapped back
 // back again
 //
 // Parameters:
 // var_name - Name of session variable
 // map - true = map variable, false = unmap varaible
 //
 // Returns:
 // None
 function link_session_variable($var_name, $map)
 {
   if ($map)
   {
     // Map global to session variable. If the global variable is already set to some value
     // then its value overwrites the session varibale. I **THINK** this is correct behaviour
     if (isset($GLOBALS[$var_name]))
     {
       $_SESSION[$var_name] = $GLOBALS[$var_name];
     }

     $GLOBALS[$var_name] =& $_SESSION[$var_name];
   }
   else
  {
     // Unmap global from session variable (note that the global variable keeps the value of
     // the session variable. This should be unnecessary but it reflects the same behaviour
     // as having register_globals enabled, so in case the OSC code assumes this behaviour,
     // it is reproduced here
     $nothing = 0;
     $GLOBALS[$var_name] =& $nothing;
     unset($GLOBALS[$var_name]);
     $GLOBALS[$var_name] = $_SESSION[$var_name];
   }
 }
// <<< END REGISTER_GLOBALS

Edited by toasty
Link to comment
Share on other sites

Hi

 

Hope someone can help. Have installed the mod and, from what I can make out, it is all working OK.. My problems are more cosmetic. For some reason, the colours within the table aren't the same as on the Create Account page but I can't see what the problem is. There is also a Table Background graphic that isn't showing although it is listed.

 

New page

https://sslrelay.com/smellyourmum.com/catalog/Order_Info.php

 

Create Account for the comparison

https://sslrelay.com/smellyourmum.com/catal...ate_account.php

 

if anyone could point me in the right direction, I'd appreciate it!

 

Cheers

Link to comment
Share on other sites

Well, for anyone interested in the above problems I was having they were solved by the solution described in my previous post. Not sure why it was required, but it works, following thorough testing.

 

In addition to that I found the logic of the PWA contrib a bit contradictory.

 

As I understand for it any shopper using pwa, if they complete checkout correctly there should be an order in the orders table (that also has all the required customer details). Any related PWA customer records should be deleted as a part of the PWA process.

 

If however a PWA customer prematurely leaves without completing the checkout process customer records are left behind.

 

Why does PWA attempt to use these records if the same shopper comes back (defined as same fname, lname and email address). They did not want an account so don't give them one and cause confusion and security risks!

 

I think PWA was wrong and I have changed the logic to delete all old pwa records for a revisitting user. As a result I keep a nice clean database with no spurious customer data.

 

Apart from the days spent sorting this out its a good contrib, my thanks to those that have put in so much effort before me and made this possible.

 

(If anyone wants this I am happy to provide it with no warranties! But you'll need beyond compare or something similar - I don't have time for instructions at the moment)

 

cheers all.

Link to comment
Share on other sites

Well, for anyone interested in the above problems I was having they were solved by the  solution described in my previous post. Not sure why it was required, but it works, following thorough testing.

 

In addition to that I found the logic of the PWA contrib a bit contradictory.

 

As I understand for it any shopper using pwa, if they complete checkout correctly there should be an order in the orders table (that also has all the required customer details). Any related PWA customer records should be deleted as a part of the PWA process.

 

If however  a PWA customer prematurely leaves without completing the checkout process customer records are left behind.

 

Why does PWA attempt to use these records if the same shopper comes back (defined as same fname, lname and email address). They did not want an account so don't give them one and cause confusion and security risks!

 

I think PWA was wrong and I have changed the logic to delete all old pwa records for a revisitting user. As a result I keep a nice clean database with no spurious customer data.

 

Apart from the days spent sorting this out its a good contrib, my thanks to those that have put in so much effort before me and made this possible.

 

(If anyone wants this I am happy to provide it with no warranties! But you'll need beyond compare or something similar - I don't have time for instructions at the moment)

 

cheers all.

 

I believe that, if installed correctly, the data is physically deleted from the customer table when that customer (who previously prematurely exited the checkout process) signs in again.

 

so if he/she completes the checkout, it is deleted at success if he/she does not complete checkout, it is deleted when he/she returns.

Treasurer MFC

Link to comment
Share on other sites

I believe that, if installed correctly, the data is physically deleted from the customer table when that customer (who previously prematurely exited the checkout process) signs in again.

 

so if he/she completes the checkout, it is deleted at success if he/she does not complete checkout, it is deleted when he/she returns.

 

So did - I. But I believe that is incorrect.

Various scenarious should be checked:

1. start pwa checkout. ENter all customer data, continue to checkout shipping. Then leave site.

2. Come back - enter same details - do you get new details or inherit the old? Check all th etables in your db. Check your basket.

3. Try creating a new account with the same name and email address as a leftover pwa customer. See what happens.

 

I can't remember the specific scenarios but I definately found it was not clean and was able to break it - I think the above might illustrate.

 

If you follow the code in order_info_process.php (a PWA specific file) the code checks the firstname, lastname and emailaddress if the existing customer record = the new guest (in customers table) and the PWA flag is set it uses the existing id and some of the data and does updates to it. I found various anomolies when checking the data and testing different scenarios. (sorry, did not document)

I have removed that routine as superfluous for the reasons I described and if an existing pwa customer is found it is deleted and a new one created; end of story. I am much happier with it this way.

 

I have pasted some of the original pwa code from with comments below to illustarte my findings:

order_info_process.php (FROM AROUND LINE 244)

  } else {  //COMMENT: THIS ELSE MEANS THE DATA IS VALID and as we are here we are doing a PWA so let's do it.......


// PWA 0.70 : SELECT using new method of determining a customer has purchased without account:
// COMMENT - =======================
//COMMENT: Get all the customers from db that have same fname, lname and email address...............
   $check_customer_query = tep_db_query("select customers_id, purchased_without_account, 
	 customers_firstname, customers_password, customers_email_address,
	 customers_default_address_id from " . TABLE_CUSTOMERS . "
	 where upper(customers_email_address) = '" . strtoupper($HTTP_POST_VARS['email_address']) . "' and
       upper(customers_firstname) = '" . strtoupper($HTTP_POST_VARS['firstname']) . "' and
       upper(customers_lastname) = '" . strtoupper($HTTP_POST_VARS['lastname']) . "'");
  
// if password is EMPTY (null) and e-mail address is same then we just load up their account information.
// could be security flaw -- might want to setup password = somestring and have it recheck here (during the first initial
// creation

	 $check_customer = tep_db_fetch_array($check_customer_query);
       
     if (tep_db_num_rows($check_customer_query)) {
   
   // PWA 0.70 added this for backwards compatibility with older versions of PWA
   // that made a blank password, causing logins to fail:
   if(!$check_customer['purchased_without_account']) {
  	 list($md5hash, $salt) = explode(':',$check_customer['customers_password']);
  	 if(md5($salt) == $md5hash) {
     // password was blank; customer purchased without account using a previous version of PWA code
     $check_customer['purchased_without_account'] = 1;
  	 }
   }
// COMMENT - =======================
// COMMENT: I don't need above legacy code about password so took it out. The below IF statement checks if our existing customer record is indeed a pwa customer - if not lets redirect to login....
       if ($check_customer['purchased_without_account'] != 1) {
         tep_redirect(tep_href_link(FILENAME_LOGIN, 
        	 'login=fail&reason=' . urlencode(
    	 str_replace('{EMAIL_ADDRESS}',$check_customer['customers_email_address'],PWA_FAIL_ACCOUNT_EXISTS)), 'SSL'));
// COMMENT - =======================
// COMMENT - ....BUT, if it IS an existing PWA record then do all this processing and updating of the existing address data - THERE ARE NO DELETES HERE. The result is the old data remains. I have removed all of this and just delete the existing records before creating the new, with a new id. 
       } else {
         $customer_id = $check_customer['customers_id'];
         // now get latest address book entry:
         $get_default_address = tep_db_query("select address_book_id, entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . "
               where customers_id = '" . $customer_id . "' ORDER BY address_book_id DESC LIMIT 1");
         $default_address = tep_db_fetch_array($get_default_address);
         $customer_default_address_id = $default_address['address_book_id'];
         $customer_first_name = $check_customer['customers_firstname'];
         $customer_country_id = $default_address['entry_country_id'];
         $customer_zone_id = $default_address['entry_zone_id'];
         tep_session_register('customer_id');
         tep_session_register('customer_default_address_id');
         tep_session_register('customer_first_name');
         tep_session_register('customer_country_id');
         tep_session_register('customer_zone_id');
         // PWA 0.71 update returning customer's address book:
        $customer_update = array('customers_firstname' => $firstname,
                            'customers_lastname' => $lastname,
                            'customers_telephone' => $telephone,
                            'customers_fax' => $fax);
  if (ACCOUNT_GENDER == 'true') $customer_update['customers_gender'] = $gender;
     tep_db_perform(TABLE_CUSTOMERS, $customer_update, 'update', "customers_id = '".$customer_id."'");
  
  $address_book_update = array('customers_id' => $customer_id,
        'entry_firstname' => $firstname,
                'entry_lastname' => $lastname,
                'entry_street_address' => $street_address,
                'entry_postcode' => $postcode,
                'entry_city' => $city,
                'entry_country_id' => $country);
                  if (ACCOUNT_GENDER == 'true') $address_book_update['entry_gender'] = $gender;
   if (ACCOUNT_COMPANY == 'true') $address_book_update['entry_company'] = $company;
   if (ACCOUNT_SUBURB == 'true') $address_book_update['entry_suburb'] = $suburb;
   if (ACCOUNT_STATE == 'true') {
    if ($zone_id > 0) {
     $address_book_update['entry_zone_id'] = $zone_id;
     $address_book_update['entry_state'] = '';
    } else {
     $address_book_update['entry_zone_id'] = '0';
     $address_book_update['entry_state'] = $state;
    }
   }
        tep_db_perform(TABLE_ADDRESS_BOOK, $address_book_update, 'update', "address_book_id = '".$customer_default_address_id."'");
  } // if-else $pass_ok

         if ($HTTP_POST_VARS['setcookie'] == '1') {
           setcookie('email_address', $HTTP_POST_VARS['email_address'], time()+2592000);
           setcookie('password', $HTTP_POST_VARS['password'], time()+2592000);
           setcookie('first_name', $customer_first_name, time()+2592000);
         } elseif ( ($HTTP_COOKIE_VARS['email_address']) && ($HTTP_COOKIE_VARS['password']) ) {
           setcookie('email_address', '');
           setcookie('password', '');
           setcookie('first_name', '');
         } // if cookies

         $date_now = date('Ymd');
         tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(),
       customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . $customer_id . "'");

       } else {
       // if customer_exist = NO

 // PWA 0.70 : new way of determining a customer purchased without an account : just say so!
   $sql_data_array = array('purchased_without_account' => 1,
               'customers_firstname' => $firstname,
                           'customers_lastname' => $lastname,
                           'customers_email_address' => $email_address,
                           'customers_telephone' => $telephone,
                           'customers_fax' => $fax,
                           'customers_newsletter' => $newsletter,
                           'customers_password' => tep_encrypt_password($password));
//                            'customers_default_address_id' => 1);

   if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
   if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

   tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

   $customer_id = tep_db_insert_id();

   $sql_data_array = array('customers_id' => $customer_id,
                           'address_book_id' => $address_id,
                           'entry_firstname' => $firstname,
                           'entry_lastname' => $lastname,
                           'entry_street_address' => $street_address,
                           'entry_postcode' => $postcode,
                           'entry_city' => $city,
                           'entry_country_id' => $country);

   if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
   if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
   if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
   if (ACCOUNT_STATE == 'true') {
     if ($zone_id > 0) {
       $sql_data_array['entry_zone_id'] = $zone_id;
       $sql_data_array['entry_state'] = '';
     } else {
       $sql_data_array['entry_zone_id'] = '0';
       $sql_data_array['entry_state'] = $state;
     }
   }

   tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

     $address_id = tep_db_insert_id();
  
     tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

     tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");	

   $customer_first_name = $firstname;
   $customer_default_address_id = $address_id;
   $customer_country_id = $country;
   $customer_zone_id = $zone_id;
   tep_session_register('customer_id');
   tep_session_register('customer_first_name');
   tep_session_register('customer_default_address_id');
   tep_session_register('customer_country_id');
   tep_session_register('customer_zone_id');

} // ELSE CUSTOMER=NO

 

This clean approach leads to orders correctly being linked to non-existant customer records. I don't actually like the way pwa works on this principal. I think it should use separate tables to maintain an audit trail (and so the alterring of core tables is not required), but that's another story. Maybe I'll do that one day - for now I'm thankful someone has come with a solution that works for me!

Link to comment
Share on other sites

I believe that, if installed correctly, the data is physically deleted from the customer table when that customer (who previously prematurely exited the checkout process) signs in again.

 

so if he/she completes the checkout, it is deleted at success if he/she does not complete checkout, it is deleted when he/she returns.

 

ps.....the delete you refer to is only performed on checkout success. i.e. when a pwa customer order is completed then the details are deleted. I have made this delete a function and called from order_info_process to ensure capturing all scenarios.

 

pps. oops - one example I gave is not a problem - there is a delete in create_account .php so that's fine.

Link to comment
Share on other sites

hummmm....having posting problems here. This is what I meant to post - I'll shuttup now.

 

ps.....the delete you refer to is only performed on checkout success. i.e. when a pwa customer order is <completed> then the details are deleted, not when prematurely leaving the site. I have made this delete a function and called from order_info_process as well to ensure capturing all scenarios.

 

pps. oops - one example I gave is not a problem - there is a delete in create_account .php that deletes an existing pwa customers details before creating anew account, so that appears fine...ish.....Another thing I spotted is that the pwa delete makes the assumption that there is only 1 existing pwa record - it is possible the same user binned out twice - so I changed it to a while loop to delete all pwa records for a given customer.

This is also true for the create_account delete.

Also, another inconsistency in the logic. In order_info_process it uses fname, lname, emaill to dientify an existing pwa customer. In create_account it appears to rely solely on the email address - which is it to be?

 

...and while I'm at it, the pwa flag is set in checkout_success - I have'nt looked closely at this, buit it occurrs to be that this should be part of the pwa account create process as a <transaction>, otherwise it is possible to have a pwa cutomer without a pwa flag set if a system failure occurs - call me pedantic but that leads to good practice.

 

I'll stop rambling now and get back to geeking :blink: .

Link to comment
Share on other sites

hummmm....having posting problems here. This is what I meant to post - I'll shuttup now.

 

ps.....the delete you refer to is only performed on checkout success. i.e. when a pwa customer order is <completed> then the details are deleted, not when prematurely leaving the site. I have made this delete a function and called from order_info_process as well to ensure capturing all scenarios.

 

pps. oops - one example I gave is not a problem - there is a delete in create_account .php that deletes an existing pwa customers details before creating anew account, so that appears fine...ish.....Another thing I spotted is that the pwa delete makes the assumption that there is only 1 existing pwa record - it is possible the same user binned out twice - so I changed it to a while loop to delete all pwa records for a given customer.

This is also true for the create_account delete.

Also, another inconsistency in the logic. In order_info_process it uses fname, lname, emaill to dientify an existing pwa customer. In create_account it appears to rely solely on the email address - which is it to be?

 

...and while I'm at it, the pwa flag is set in checkout_success - I have'nt looked closely at this, buit it occurrs to be that this should be part of the pwa account create process as a <transaction>, otherwise it is possible to have a pwa cutomer without a pwa flag set if a system failure occurs - call me pedantic but that leads to good practice.

 

I'll stop rambling now and get back to geeking :blink: .

 

 

you are right, this is all I have left at the bottom of order_info_process, the rest is irrelevant stuff.

 

<?php

} else {

 

// check if customer data already exists with PWA

$check_customer_query = tep_db_query("select customers_id,purchased_without_account from " . TABLE_CUSTOMERS . " where upper(customers_email_address) = '" . strtoupper($HTTP_POST_VARS['email_address']) . "' and purchased_without_account = 1");

$check_customer = tep_db_fetch_array($check_customer_query);

 

// delete those records

if (tep_db_num_rows($check_customer_query)) {

$customer_id = $check_customer['customers_id'];

tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customer_id) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customer_id) . "'");

tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customer_id) . "'");

}

// go on with the process

$sql_data_array = array('purchased_without_account' => 1,'customers_firstname' => $firstname,'customers_lastname' => $lastname,'customers_email_address' => $email_address,'customers_telephone' => $telephone,'customers_fax' => $fax,'customers_newsletter' => $newsletter,'customers_password' => tep_encrypt_password($password));

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

$customer_id = tep_db_insert_id();

$sql_data_array = array('customers_id' => $customer_id,'address_book_id' => $address_id,'entry_firstname' => $firstname,'entry_lastname' => $lastname,'entry_street_address' => $street_address,'entry_postcode' => $postcode,'entry_city' => $city,'entry_country_id' => $country);

if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;

if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;

if (ACCOUNT_STATE == 'true') {

if ($zone_id > 0) {

$sql_data_array['entry_zone_id'] = $zone_id;

$sql_data_array['entry_state'] = '';

} else {

$sql_data_array['entry_zone_id'] = '0';

$sql_data_array['entry_state'] = $state;

}

}

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

$customer_first_name = $firstname;

$customer_default_address_id = $address_id;

$customer_country_id = $country;

$customer_zone_id = $zone_id;

tep_session_register('customer_id');

tep_session_register('customer_first_name');

tep_session_register('customer_default_address_id');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

tep_session_register('noaccount');

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Treasurer MFC

Link to comment
Share on other sites

I'm following this thread, but I get a little confused after 42 pages.:wacko:

 

Can anybody (boxtel or toasty) put a conclusion at the end? Like a piece of the mentioned code that is ready to be cut and paste. And the place to put it.

 

This would be very helpfull to all the users without a lot of php knowledge.

 

Thanks,

 

Marco

Link to comment
Share on other sites

I'm following this thread, but I get a little confused after 42 pages.:wacko:

 

Can anybody (boxtel or toasty) put a conclusion at the end? Like a piece of the mentioned code that is ready to be cut and paste.  And the place to put it.

 

This would be very helpfull to all the users without a lot of php knowledge.

 

Thanks,

 

Marco

Marco

I am happy to do that but I can give no guarantee it will work on your installation.

In particular I have the Register_Globals contrib installed. If you have'nt I cannot guarantee it will work the same (it might not affect these changes, I have not looked) - and if you haven't got Register_Globals YOU SHOULD HAVE!!...unless you like being hacked. So do that first anyway!

 

so... with no guarantees at all whasoever in this lifetime or any other here is some code:

 

FILE: order_info_process, snippet from original line 134 (else)) to end of file

 

  } else { //if data is sane

// Linkmatics PWA  : Check if a previous PWA customer with data left in tables (purchased without account = if customer fname, lname and email exist and pwa set to 1)
      $check_customer_query = tep_db_query("select customers_id, purchased_without_account, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " 	 where upper(customers_email_address) = '" . strtoupper($HTTP_POST_VARS['email_address']) . "' and upper(customers_firstname) = '" . strtoupper($HTTP_POST_VARS['firstname']) . "' and upper(customers_lastname) = '" . strtoupper($HTTP_POST_VARS['lastname']) . "'");
// Linkmatics PWA  : Temporarily Replace above line with this next line to purge database of all PWA customer records after testing is complete
// $check_customer_query = tep_db_query("select customers_id, purchased_without_account, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where purchased_without_account = '" . 1 . "'");
   while ($check_customer = tep_db_fetch_array($check_customer_query)){
// Linkmatics PWA - If a previous PWA customer with data existing, then delete the existing customer data
	 if((int)$check_customer['purchased_without_account'] == 1) {
    pwa_cleanup($check_customer['customers_id']);
	 }
	 else {
    // Linkmatics PWA = If cust exists and pwa !=1 then redirect to failed login
             tep_redirect(tep_href_link(FILENAME_LOGIN, 'login=fail&reason=' . urlencode(str_replace('{EMAIL_ADDRESS}',$check_customer['customers_email_address'],PWA_FAIL_ACCOUNT_EXISTS)), 'SSL'));  
     }
   } 	 

// Linkmatics PWA - if here we are sure there is no existing PWA customer so create a pwa customer for this order
      $sql_data_array = array('purchased_without_account' => 1,
         'customers_firstname' => $firstname,
                           'customers_lastname' => $lastname,
                           'customers_email_address' => $email_address,
                           'customers_telephone' => $telephone,
                           'customers_fax' => $fax,
                           'customers_newsletter' => $newsletter,
                           'customers_password' => tep_encrypt_password($password));
      if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;
      if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);
   tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
      $customer_id = tep_db_insert_id();
   $sql_data_array = array('customers_id' => $customer_id,
                           'address_book_id' => $address_id,
                           'entry_firstname' => $firstname,
                           'entry_lastname' => $lastname,
                           'entry_street_address' => $street_address,
                           'entry_postcode' => $postcode,
                           'entry_city' => $city,
                           'entry_country_id' => $country);
      if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;
      if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
      if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;
      if (ACCOUNT_STATE == 'true') {
         if ($zone_id > 0) {
          $sql_data_array['entry_zone_id'] = $zone_id;
          $sql_data_array['entry_state'] = '';
          }
	 else {
          $sql_data_array['entry_zone_id'] = '0';
          $sql_data_array['entry_state'] = $state;
       }
      }

     tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
  $address_id = tep_db_insert_id();
  tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
     tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");	
  $customer_first_name = $firstname;
     $customer_default_address_id = $address_id;
     $customer_country_id = $country;
     $customer_zone_id = $zone_id;
     tep_session_register('customer_id');
     tep_session_register('customer_first_name');
     tep_session_register('customer_default_address_id');
     tep_session_register('customer_country_id');
     tep_session_register('customer_zone_id');

// restore cart contents
   $cart->restore_contents();

   // build the message content
// DDB - 040622 - no mail will be sent
//    $name = $firstname . " " . $lastname;
//
//    if (ACCOUNT_GENDER == 'true') {
//       if ($HTTP_POST_VARS['gender'] == 'm') {
//         $email_text = EMAIL_GREET_MR;
//       } else {
//         $email_text = EMAIL_GREET_MS;
//       }
//    } else {
//      $email_text = EMAIL_GREET_NONE;
//    }
//
//    $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
//    tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

//    tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

tep_session_register('noaccount');
// LINKMATICS PWA COMMENT: Added next line because session tests were not returning true. Setting it to a value seems to do the trick.
$_SESSION['noaccount'] = '1';
   tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 }

 require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

 

 

 

FILE: general.php (in catalog/includes/functions)

Add this to the end of the file (just before the last line), not strictly the right place but it'll do.

// >>> BEGIN Linkmatics PWA
 function pwa_cleanup($customers_id)
 {
 tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customers_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . tep_db_input($customers_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customers_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . tep_db_input($customers_id) . "'");
 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . tep_db_input($customers_id) . "'");
 tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customers_id) . "'");
 }
 // <<< END Linkmatics PWA

 

I THINK that is all you need. Good Luck.

 

ps - make backups before trying this!

Edited by toasty
Link to comment
Share on other sites

Hi

 

Hope someone can help.  Have installed the mod and, from what I can make out, it is all working OK..  My problems are more cosmetic.  For some reason, the colours within the table aren't the same as on the Create Account page but I can't see what the problem is.  There is also a Table Background graphic that isn't showing although it is listed.

 

New page

https://sslrelay.com/smellyourmum.com/catalog/Order_Info.php

 

Create Account for the comparison

https://sslrelay.com/smellyourmum.com/catal...ate_account.php

 

if anyone could point me in the right direction, I'd appreciate it!

 

Cheers

 

anyone got any thoughts or advice on the above?

Link to comment
Share on other sites

Hello, I have installed PWA on two stores and have two questions.

 

1. On both these stores, it seems that the customer account is not deleted, even if a customer goes through the whole checkout process. I was looking through the forum for info on this, and saw the code posted by Toasty a few posts up... is this snippet from the catalog/Order_Info_Process.php or some other file? My file doesn't have any reference to "Linkmatic PWA" so I was confused.

 

2. I have not yet installed the March 25 update, although I think it's a great idea... on one of my stores, we are using Separate Pricing Per Customer, though, and need a way to access the account area. Does this contrib remove the Acount link in the nav bar as well as the box on teh checkout page? If not, I can give it a try, but we need to allow wholesalers to login to their account.

 

Many thanks for any advice!

Janet

Link to comment
Share on other sites

Hello, I have installed PWA on two stores and have two questions. 

 

1. On both these stores, it seems that the customer account is not deleted, even if a customer goes through the whole checkout process.  I was looking through the forum for info on this, and saw the code posted by Toasty a few posts up... is this snippet from the catalog/Order_Info_Process.php or some other file?  My file doesn't have any reference to "Linkmatic PWA" so I was confused.

 

2. I have not yet installed the March 25 update, although I think it's a great idea... on one of my stores, we are using Separate Pricing Per Customer, though, and need a way to access the account area.  Does this contrib remove the Acount link in the nav bar as well as the box on teh checkout page?  If not, I can give it a try, but we need to allow wholesalers to login to their account.

 

Many thanks for any advice!

Janet

 

Hi Janet

1. My apologies. Linkmatics is my co. name - Where it states Linkmatics PWA it means it is an entry or update I have made that is specifically related to the PWA contrib.

 

2. I'm not sure what the March 25 contrib is but I think I can answer your question. The Account link in the header nav bar is only removed when the buyer selects proceed directly to checkout (ie PWA) (instead of logging in). The account link is removed when the buyer gets to the shipping page after enterring personal details.

Your wholesalers and any other customers will have access to the My Account link unless they select PWA checkout.

 

Hope that helps.

Chris.

Link to comment
Share on other sites

Hi Janet

1. My apologies. Linkmatics is my co. name - Where it states Linkmatics PWA it means it is an entry or update I have made that is specifically related to the PWA contrib.

 

2. I'm not sure what the March 25 contrib is but I think I can answer your question. The Account link in the header nav bar is only removed when the buyer selects proceed directly to checkout (ie PWA) (instead of logging in). The account link is removed when the buyer gets to the shipping page after enterring personal details.

Your wholesalers and any other customers will have access to the My Account link unless they select PWA checkout.

 

Hope that helps.

Chris.

 

Ah, excellent! Thank you! Now if I can just be certain where in my code to replace with yours. If you don't mind, I've copied my code below (from where the footer ends on the page. Is it from the first else statement or further down? This section starts in my code around line 244... thanks so much for your assistance!

 

<!-- body_eof //-->

 

<!-- footer //-->

<?php include(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<?php

} else {

 

// PWA 0.70 : SELECT using new method of determining a customer has purchased without account:

$check_customer_query = tep_db_query("select customers_id, purchased_without_account,

customers_firstname, customers_password, customers_email_address,

customers_default_address_id from " . TABLE_CUSTOMERS . "

where upper(customers_email_address) = '" . strtoupper($HTTP_POST_VARS['email_address']) . "' and

upper(customers_firstname) = '" . strtoupper($HTTP_POST_VARS['firstname']) . "' and

upper(customers_lastname) = '" . strtoupper($HTTP_POST_VARS['lastname']) . "'");

 

// if password is EMPTY (null) and e-mail address is same then we just load up their account information.

// could be security flaw -- might want to setup password = somestring and have it recheck here (during the first initial

// creation

 

$check_customer = tep_db_fetch_array($check_customer_query);

 

if (tep_db_num_rows($check_customer_query)) {

 

// PWA 0.70 added this for backwards compatibility with older versions of PWA

// that made a blank password, causing logins to fail:

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

list($md5hash, $salt) = explode(':',$check_customer['customers_password']);

if(md5($salt) == $md5hash) {

// password was blank; customer purchased without account using a previous version of PWA code

$check_customer['purchased_without_account'] = 1;

}

}

 

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

tep_redirect(tep_href_link(FILENAME_LOGIN,

'login=fail&reason=' . urlencode(

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

 

} else {

$customer_id = $check_customer['customers_id'];

// now get latest address book entry:

$get_default_address = tep_db_query("select address_book_id, entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . "

where customers_id = '" . $customer_id . "' ORDER BY address_book_id DESC LIMIT 1");

$default_address = tep_db_fetch_array($get_default_address);

$customer_default_address_id = $default_address['address_book_id'];

$customer_first_name = $check_customer['customers_firstname'];

$customer_country_id = $default_address['entry_country_id'];

$customer_zone_id = $default_address['entry_zone_id'];

tep_session_register('customer_id');

tep_session_register('customer_default_address_id');

tep_session_register('customer_first_name');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

// PWA 0.71 update returning customer's address book:

$customer_update = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_telephone' => $telephone,

'customers_fax' => $fax);

if (ACCOUNT_GENDER == 'true') $customer_update['customers_gender'] = $gender;

tep_db_perform(TABLE_CUSTOMERS, $customer_update, 'update', "customers_id = '".$customer_id."'");

 

$address_book_update = array('customers_id' => $customer_id,

'entry_firstname' => $firstname,

'entry_lastname' => $lastname,

'entry_street_address' => $street_address,

'entry_postcode' => $postcode,

'entry_city' => $city,

'entry_country_id' => $country);

if (ACCOUNT_GENDER == 'true') $address_book_update['entry_gender'] = $gender;

if (ACCOUNT_COMPANY == 'true') $address_book_update['entry_company'] = $company;

if (ACCOUNT_SUBURB == 'true') $address_book_update['entry_suburb'] = $suburb;

if (ACCOUNT_STATE == 'true') {

if ($zone_id > 0) {

$address_book_update['entry_zone_id'] = $zone_id;

$address_book_update['entry_state'] = '';

} else {

$address_book_update['entry_zone_id'] = '0';

$address_book_update['entry_state'] = $state;

}

}

tep_db_perform(TABLE_ADDRESS_BOOK, $address_book_update, 'update', "address_book_id = '".$customer_default_address_id."'");

} // if-else $pass_ok

 

if ($HTTP_POST_VARS['setcookie'] == '1') {

setcookie('email_address', $HTTP_POST_VARS['email_address'], time()+2592000);

setcookie('password', $HTTP_POST_VARS['password'], time()+2592000);

setcookie('first_name', $customer_first_name, time()+2592000);

} elseif ( ($HTTP_COOKIE_VARS['email_address']) && ($HTTP_COOKIE_VARS['password']) ) {

setcookie('email_address', '');

setcookie('password', '');

setcookie('first_name', '');

} // if cookies

 

$date_now = date('Ymd');

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(),

customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . $customer_id . "'");

 

} else {

// if customer_exist = NO

 

// PWA 0.70 : new way of determining a customer purchased without an account : just say so!

$sql_data_array = array('purchased_without_account' => 1,

'customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

'customers_password' => tep_encrypt_password($password));

// 'customers_default_address_id' => 1);

 

if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

 

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

 

$customer_id = tep_db_insert_id();

 

$sql_data_array = array('customers_id' => $customer_id,

'address_book_id' => $address_id,

'entry_firstname' => $firstname,

'entry_lastname' => $lastname,

'entry_street_address' => $street_address,

'entry_postcode' => $postcode,

'entry_city' => $city,

'entry_country_id' => $country);

 

if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender;

if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;

if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb;

if (ACCOUNT_STATE == 'true') {

if ($zone_id > 0) {

$sql_data_array['entry_zone_id'] = $zone_id;

$sql_data_array['entry_state'] = '';

} else {

$sql_data_array['entry_zone_id'] = '0';

$sql_data_array['entry_state'] = $state;

}

}

 

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

 

$address_id = tep_db_insert_id();

 

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

 

$customer_first_name = $firstname;

$customer_default_address_id = $address_id;

$customer_country_id = $country;

$customer_zone_id = $zone_id;

tep_session_register('customer_id');

tep_session_register('customer_first_name');

tep_session_register('customer_default_address_id');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

 

} // ELSE CUSTOMER=NO

 

// restore cart contents

$cart->restore_contents();

 

// build the message content

// DDB - 040622 - no mail will be sent

// $name = $firstname . " " . $lastname;

//

// if (ACCOUNT_GENDER == 'true') {

// if ($HTTP_POST_VARS['gender'] == 'm') {

// $email_text = EMAIL_GREET_MR;

// } else {

// $email_text = EMAIL_GREET_MS;

// }

// } else {

// $email_text = EMAIL_GREET_NONE;

// }

//

// $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

// tep_mail($name, $email_address, EMAIL_SUBJECT, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');

 

// tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

tep_session_register('noaccount');

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

}

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Link to comment
Share on other sites

Janet

yes - you are correct. Don't forget to add the function to general.php as described in my earlier post.

Do make sure you back up first. I have only tested this on my install. If it does work for you would you please report back in here for other folk and state what other (if any) contribs you have installed.

happy pasting!

Chris.

Link to comment
Share on other sites

For some reason I did not manage to proceed directly to checkout; some people here had added their comments concering my question posted a while ago (thank you for that!), but i didn;t manage to get it working :'(

I have finally decided to stay with the pwa the way it is (without the direct to checkout), but want to make a few layout changes, but I couldn't manage to do it :angry: . All changes refer to the page where the customer can choose between the three options "log in", "create account" and "proceed to checkout". Maybe someone out there can help me with the following questions:

(1)I want the option "proceed to checkout" to appear first in the list. I thought that would be quite straightforward, so I simply cut the block of ode which begins with

//BOF: MaxiDVD Purchase With-Out An Account SECTION
//===========================================================
if (($cart->count_contents() >

and ends with

<?php
}
//EOF: MaxiDVD Purchase With-Out An Account SECTION
//===========================================================

 

 

from the end of the file login_pwa.php to the beginning of the same file. But it doesn't work: After this change, the whole block of text related to proceeding to checkout without loging in just disappears. Why is this? What did I do wrong?

 

(2)Currently, the heading title defined in login.php is used both for the purchase without account as well as when a client opens a new account by clicking the button "my account" in the header. I would like to have a different heading-title for the purchase without account-page. is that possible?

 

(3)Finally, I would like to include a text between the heading title and the first option (which now should be "proceed directly to checkout"). I want this text to appear only in the purchase without account; it should not be displayed when a customer creates an account by clicking the "my account" button in the header. Is there a way I can get this done?

 

I hope someone can help me with these problems.

 

Greetings,

Rose

Link to comment
Share on other sites

I hope someone can help me with these problems.

 

Greetings,

Rose

 

Ups, sorry about that. I just tried copying and pasting the code again, and now it works. don't know what i did wrong the first time.

Well, problem (1) is solved :D

 

Can anybody help with with problems (2) and (3)?

 

Thanks,

Rose

Link to comment
Share on other sites

Janet

yes - you are correct. Don't forget to add the function to general.php as described in my earlier post.

Do make sure you back up first. I have only tested this on my install. If it does work for you would you please report back in here for other folk and state what other (if any) contribs you have installed.

happy pasting!

Chris.

 

Thank you Toasty, this worked like a charm! For others trying this, my install also includes the following contributions:

Link to comment
Share on other sites

Thank you Toasty, this worked like a charm!  :lol: For others trying this, my install also includes the following contributions:

 

Sorry, here are the contribs:

Register Globals Patch

Easy Populate

STS

Attibute Sets

Small Medium Large Images

osCProductListingSelect

 

Onward and upward!

Janet

Link to comment
Share on other sites

Sorry, here are the contribs:

Register Globals Patch

Easy Populate

STS

Attibute Sets

Small Medium Large Images

osCProductListingSelect

 

Onward and upward!

Janet

 

Excellent news. A pleasure to be of service.

Now to get Easypopulate working...

Link to comment
Share on other sites

Excellent news. A pleasure to be of service.

Now to get Easypopulate working...

 

did anyone get PWA to work with DOWNLOADABLE content?

It seems that if I turn the PWA on, and a user just skips and checks out, pays for the item, the downloadable digital file, when clicked on is blank/won't download.

 

Now if you setup an account, checkout pay, it is there.

 

Anyone get PWA to work with downloadble content such as mp3s?

 

Thanks

Link to comment
Share on other sites

Sorry if these are reposts, but searching through 43 pages of stuff is far too time consuming when I need a probably simple answer. Most likely I just need to know what files to look in.

 

1) How do I get rid of the "my account" link at the top of the page altogether?

 

2) On the front index page, at the top it says "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?" How do I get rid of this?

 

3) On the main category pages, there is the text at the top "Let's see what we have here" and then a broken image (Alt is "Let's see what we have here"). Again, where is this?

 

4) In the category pages, on the sorting options, I would like to get rid of the "price" field altogether. Is this possible?

 

5) In the "my account" page, where the user is asked to enter their shipping, etc info, there is a line at the top the reads "NOTE: If you already have an account with us, please login at the login page." How do I get rid of this?

 

I'm sorry if this is too much. If you think it is, please say so, and I'll keep digging. If they're easy fixes, please help!

Edited by rla128
Link to comment
Share on other sites

  • 2 weeks later...

Hi rla128,

 

Get ready to work... :D

 

+++Backup your original files+++ then get to editing...

 

 

1. Edit your catalog/includes/header.php

 

Find:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

 

Change to:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

 

 

================

 

 

2. Edit your catalog/index.php

 

 

Find:

 

<td class="main"><?php echo tep_customer_greeting(); ?></td>

 

Change to remove the greeting:

 

<td class="main"><?php //echo tep_customer_greeting(); ?></td>

 

 

Find:

 

<td class="main"><?php echo TEXT_MAIN; ?></td>

 

Change to remove the text:

 

<td class="main"><?php //echo TEXT_MAIN; ?></td>

 

 

================

 

 

3. Edit your catalog/includes/languages/english/index.php

 

 

Find:

 

define('HEADING_TITLE', 'Let\'s See What We Have Here');

 

 

Change to this if you want to remove the text:

 

//define('HEADING_TITLE', 'Let\'s See What We Have Here');

 

 

OR

 

 

If you want to change the text and/or image do this:

 

 

define('HEADING_TITLE', 'Add your custom text here!');

 

 

Make sure to "blank" images that you do not want to show in PaintShop Pro or MS Paint, that are the same color as your pages (i.e. white, ect.)

 

These are the ones I "blanked" out:

 

Edit:

 

catalog/images/

 

account_notifications.gif

account_orders.gif

account_personal.gif

 

header_account.gif

 

table_background_account.gif

table_background_browse.gif

table_background_checkout.gif

table_background_confirmation.gif

table_background_contact_us.gif <--change to your liking or blank it

table_background_default.gif

table_background_delivery.gif

table_background_history.gif

table_background_login.gif

table_background_man_on_board.gif <--change to your liking or blank it

table_background_password_forgotten.gif

table_background_payment.gif

table_background_reviews.gif

table_background_reviews_new.gif

table_background_specials.gif

 

 

Edit:

 

catalog/images/mail/

 

background.gif <-- blank this unless you want the oscommerce name to be on all your e-mail messages

 

===============

 

 

4. Edit your catalog/includes/languages/english/index.php

 

Find:

 

define('TABLE_HEADING_PRICE', 'Price');

 

Change to:

 

//define('TABLE_HEADING_PRICE', 'Price');

 

 

4a.

 

1. Go to your admin section.

2. Click on the Configuration link.

3. Click on the Product Listing link.

 

Edit this setting:

 

Display Product Price 4 <-- Change this number to - 0 - "zero" and the price colume will not show. 

 

 

===============

 

 

5. Edit your catalog/create_account.php

 

 

Find:

 

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>

 

Change to:

 

<td class="smallText"><br><?php //echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>

 

 

OR

 

 

5a. If you just want to change the text and link do this:

 

 

Edit your catalog/includes/languages/english/create_account.php

 

 

Find:

 

define('TEXT_ORIGIN_LOGIN', '<font color="#FF0000"><small><b>NOTE:</b></font></small> If you already have an account with us, please login at the <a href="%s"><u>login page</u></a>.');

 

 

Change to:

 

define('TEXT_ORIGIN_LOGIN', '<font color="#FF0000"> Add your own text here.');

 

 

And then...

 

Edit your catalog/create_account.php

 

Find:

 

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>

 

Change to:

 

<td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN); ?></td>

 

Note: The code is wrapped within the post, make sure that it is NOT within your oscommerce files.

 

That's it. :thumbsup:

Running osC - 2.2MS2. P.S. Please don't ask for a link to my site, it is on a production server and not available for the general public, yet!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...