Jump to content

phelan

Members
  • Content count

    19
  • Joined

  • Last visited

1 Follower

Profile Information

  1. phelan

    purchase without account improvements

    No. The code above only deletes the customer profile but you still keep the order information which contains customer's name, address, phone number and email, you will see this information when you list the orders thru the administration, so it is very important that you either back up this information and don't delete the order, just in case you need this information again.
  2. I don't know how comfortable you feel about messing with the code but I made the following changes to /catalog/includes/modules/product_listing.php, around line 111 add after this line case 'PRODUCT_LIST_NAME': copy and paste the following code between the next case line, $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $desc_query = "SELECT products_description FROM products_description WHERE products_id ='" . $listing['products_id'] . "'"; $result = mysql_query($desc_query); $product_array = mysql_fetch_array($result); $prod_description = $product_array['products_description']; $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br><span class="smallText">' . string_cut($prod_description, 200) . '</span> '; } break; and then add the following function at the bottom of the page: <?php function string_cut($string,$cut_size) { $string_size = strlen($string); $string = substr($string, 0, $cut_size); if ($cut_size <= $string_size){ $string .= ' ...'; } return $string; } ?> and that's it! just one file to edit, you may see it working at http://www.malewitch.com/catalog/default.php/cPath/9, please let me know if I was able to help you.
  3. phelan

    purchase without account improvements

    I had the same problem, when I did some test purchases without creating an account. I was able to go back and click on 'Password Forgotten?' link and get a new password and of course get access to the account, which this is not the way it is supposed to work. Here is the way I fixed it: in /catalog/checkout_success.php insert the following code right before the HTML code but within the php tags. // Added a check for a Guest checkout and cleared the session - 030411 if (tep_session_is_registered('noaccount')) { 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) . "'"); tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . tep_db_input($customer_id) . "'"); tep_session_destroy(); } this will get rid of the customer account information, therefore the customer will not have access to the account nor the order history but you will keep the order information. :idea: If you have any problems just let me know.
×