Jump to content

stu2000

Members
  • Content count

    460
  • Joined

  • Last visited

Everything posted by stu2000

  1. This contribution is for UK Stores ONLY. What it will do is add several shipping zones to your Oscommerce store. If your customer is UK based, it will not show any of the International Shipping Options, and vice versa, if your customer is International it will not show any UK based shipping methods. Shipping Methods Added: (1) Royal Mail First Class Standard Post (upto 3.0Kg Limit anymore and a courier is recommended) (2) Royal Mail Second Class Standard Post (upto 1.0Kg Limit) (3) Royal Mail First Class Recorded Post (upto 3.0Kg and ?32.00 Limit) (4) Royal Mail Second Class Recorded Post (upto 1.0Kg and ?32.00 Limit) (5) Royal Mail Standard Parcels (upto 20.0Kg and ?500) with additional insurance (6) Parcel Force 48 (>3Kg Limit, any less Royal Mail is recommended) (7) Citylink Next Day (>3Kg Limit, any less Royal Mail is recommended) (8) Royal Mail International Signed for (European Prices for weights upto 2Kg) (9) Royal Mail International Signed for (Zone 1 for weights upto 2Kg) (10) Royal Mail International Signed for (Zone 2 for weights upto 2Kg) INFORMATION =========== All Royal Mails prices are for the new style (packets) pricing as of 21st August 2006, however common sense is needed, a 3.0Kg parcel sent by Royal Mail First class standard delivery would cost ?10.69 using the new shipping prices, therefore it would make sense to post it by Royal Mail Standard Parcels, therefore we have placed limits on the lower end shipping methods. If a product goes over this limit, the shipping option will not be displayed. IMPORTANT NOTES IMPORTANT NOTES IMPORTANT NOTES IMPORTANT NOTES IMPORTANT NOTES ================================================================= IF YOU DECIDE TO INSTALL ONLY THE ROYAL MAIL MODULES AND NOT ANY OF THE COURIERS OR PARCEL FORCE MODULES, PLEASE OPEN THE ROYAL MAIL MODULES AND REMOVE THE LIMITS. If you do not remove the limits and you have no other shipping modules installed, if someone buys something from you over ?32.00, there will be no shipping option shown, hence your customer can checkout and pay ?0.00 shipping. To summarise, either install Royal Mail modules with a courier (Standard Parcels, Citylink or Parcelforce) or if you install the Royal Mail modules on their own, (RM 1st, RM 2nd, RM 1st REC or RM 2nd REC) edit the files to remove the limits. INSTALLATION ========== Only one file needs a change, for cosmetic reasons. Step (1) Open catalog/checkout_shipping.php ------------------------------------------- In checkout_confirmation, double brackets are shown and not required, so the below edit removes this. [Find around Line 121 in catalog/checkout_shipping.php] 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'), [CHANGE TO] 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . $quote[0]['methods'][0]['title']), Step (2) Upload Shipping Modules --------------------------------------- Each Shipping method has 3 files each, decide which shipping methods you want to install and upload the shipping file located in catalog/includes/modules/shipping/ and also its corresponding langauage file located in catalog/includes/languages/english/modules/shipping/ also included is an image icon, upload this into your images directory. Now goto your OSC admin panel modules-->shipping and adjust anything to suit your needs. NOTES ===== The prices in these contribs are shown inc of VAT at 17.5%, each module has a handling charge for example if you want to charge for jiffy bags, labels invoice paper etc. PRICES ====== The scripts are automatically loaded with the prices located from Royal Mails and Parcel Forces website, these values can be seen below. I am fully aware, that these prices will vary depending if you have SmartStamp or PPI accounts with Royal Mail etc. If your prices are different just update whichever string below, and copy it into the contribution via your OSC admin panel/modules/shipping. The strings shown below are defined as follows for weights in KG's (If you require grammes adjust accordingly, 0.1Kg = 100g etc) .1:1,.25:1.27,.5:1.7 What this means, is that for all items under 0.1Kg (100g) the cost of delivery is ?1.00, then for all items more than 0.1Kg but less than 0.25Kg the price of shipping is ?1.27. Notice there are no spaces and each price division is separated by a comma. Royal Mail First Class Standard (Packet Prices): .1:1,.25:1.27,.5:1.7,.75:2.2,1:2.7,1.25:4.74,1.5:5.59,1.75:6.44,2:7.29,2.25:8.14 ,2.5:8.99,2.75:9.84,3:10.69 Royal Mail Second Class Standard (Packet Prices): .1:.84,.25:1.09,.5:1.39,.75:1.77,1:2.12 Royal Mail First Class Recorded (Packet Prices): .1:1.68,.25:1.95,.5:2.38,.75:2.88,1:3.38,1.25:5.42,1.5:6.27,1.75:7.12,2:7.97,2.2 5:8.82,2.5:9.67,2.75:10.52,3:11.37 Royal Mail Second Class Recorded (Packet Prices): .1:1.52,.25:1.77,.5:2.07,.75:2.45,1:2.8 Royal Mail Standard Parcels: 1:3.85,1.5:4.95,2:5.31,4:7.7,6:8.74,8:9.97,10:10.7,20:12.46 Royal Mail Special Delivery: Royal Mail has 3 levels of special delivery depending on cost of items, these being upto ?500, ?1000 or ?2500. The three lists can be seen below, the module uses the last one of ?2500, change as neccessary via your admin panel, just copy and paste. .1:4.1,.5:4.5,1:5.7,2:7.4,10:18.5 .1:4.6,.5:5,1:6.2,2:7.9,10:19 .1:5.6,.5:6,1:7.2,2:8.9,10:20 Initial CityLink Nextday: (Amend prices to suit your account if applicable) Taken from http://www.initialcitylink.co.uk/services/...ces_pricing.php where 10Kg is ?11.60 then ?0.50 per Kg afterwards 10:11.6,15:14.1,20:16.60,25:19.1,30:21.6,35:24.1,40:26.6,45:29.1,50:31.6,55:34.1 ,60:36.6,65:39.1,70:41.6,75:44.1,80:46.6,100:56.6,125:69.1,150:81.6,200:106.6 Parcel Force 48: 10:14.25,15:18.25,20:22.25,25:26.25,30:30.25,40:38.25,50:46.25,100:86.50 SUPPORT ======= To keep this contribution clean, can I ask any other mod writters, if they find any problems to post back in the forum and if applicable I will add these changes to the next update. By doing it this way, other users will not be confused on which version to download etc. Thank you.
  2. Multiple Categories per product quick entry (Download here) This is a cool contribution by the authors Pavel Rojkov, Snowbird and CommLog. The installation instructions can be somewhat confusing, therefore I have updated the instructions and included the code snippets below, just so you can see what the changes should look like. All credits goto the original code writers. case 'insert_product': case 'update_product': // copy image only if modified $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); if (isset($products_image_name) && tep_not_null($products_image_name) && ($products_image_name != 'none')) { $sql_data_array['products_image'] = tep_db_prepare_input($products_image_name); } if ($action == 'insert_product') { if ($action == 'insert_product') { $insert_sql_data = array('products_date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array); $products_id = tep_db_insert_id(); } elseif ($action == 'update_product') { $update_sql_data = array('products_last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'"); #delete categories saved in the tables tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '". $products_id . "'"); } # create loop here to insert rows for multiple categories $selected_catids = $HTTP_POST_VARS['categories_ids']; if (!$selected_catids) $selected_catids[0] = 0; foreach ($selected_catids as $current_category_id) { tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . $products_id . "', '" . $current_category_id . "')"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE)); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } # get selected categories $categories_query_selected = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'"); $categories_array_selected = array(array('id' => '')); while ($categories = tep_db_fetch_array($categories_query_selected)) { $categories_array_selected[] = array('id' => $categories['categories_id']); } $categories_array = array(array('id' => '', 'text' => TEXT_NONE)); #Categories list displays only for one languge (Default is English) $language_id = 1; $categories_array = tep_get_category_tree(); // added by R Calder $form_action = ($HTTP_GET_VARS['pID']) ? 'update_product' : 'insert_product'; $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); //--></script> <?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID'] . '&action='. $form_action, 'post', 'enctype="multipart/form-data"'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2">
  3. Support Thread for "Sub Category Description on Selected Categories" Contribution This contribution, is designed to insert a customiseable short description into a selected sub category. Only one file requires modifying, a small piece of code inserted into catalog/index.php. The contribution uses an an IF Command, e.g IF subcategory_ID = 25 then print "Hello" Demo: http://www.almat-computers.co.uk/index.php/cPath/28 Download package includes a screenshot of contribution also. Download Contrib: http://www.oscommerce.com/community/contributions,4608
  4. Support thread for "Display Currency Flag Images instead of Drop Down Box" Contribution This contribution replaces the standard currency drop down menu infobox with clickable currency flag images instead, very similar to the languages infobox. The selected currency flag will display as bright (highlighted) and the other flags will appear deselected in a opaque manner. Flags are fully customisable and can be edited via your store's administration panel. http://www.oscommerce.com/community/contributions,4609
  5. Hi all, I have a customer, who has over 20 different category main headers and would like it displayed over 2 or 3 columns instead of the default one long one. Is this an easy task or is there a contrib available to do this. Thanx
  6. a sneaky bump :rolleyes:
  7. Hi Surfalot, if I upload the sample file in the contrib it works 100%, but if I make the smallest change (i.e change th price or something) then upload it, it adds products all over the place. Now it must be the way I am saving the file. I am using Excel 2003, then when I save file, I choose CSV (MS-DOS), then I am prompted with the following: Sample_Output_file.csv may contain features that are not compatible with CSV (MS-DOS). Do you want to keep the workbook in this format? To keep this format, which leaves out any incompatible features, click yes, or to Preserve the features, click NO. Now no matter what I choose yes or no, the file always uploads fine but the products are not in the correct category, but If I upload the unmodified sample file it works fine. I have tried this with openoffice and the same thing, so it must be something I am doing wrong. Can someone please help? I have entered the products in manually also and then download the "complete" file and changed the price and when I upload it , again it gives me duplicate products. It has to be the way I am doing it. When I upload the below 10 product .csv file, it places 10 products into "Heartsbox" Category, 4 products into 2009 Valetines Collections Category (Bustier, g-string and stockings with skull print. / Lace bra top and matching booty shorts / Bustier, g-string and stockings with skull print. & Lycra strappy teddy with O rings. ) 2 products into Beyond Dark Category (Bustier, g-string and stockings with skull print - Queen Size / Cami set, with skull print.) ============= CSV File : here EP vers: 2.76g osCommerce Online Merchant v2.2 RC2a OS: Linux 2.6.24.7 HTTP: Apache DB: MySQL 5.0.45-log PHP: 4.4.7 (Zend: 1.3.0) Temp Directory: /hermes/web01/b1438/pow.kbleyth/htdocs/temp/ Temp Dir is Writable Magic Quotes is: off register_globals is: off Split files on: 300 records Model Num Size: 30 Price with tax: false Calc Precision: 2 Replace quotes: false Field seperator: comma Excel safe output: true Preserve tab/cr/lf: false Category depth: 3 Enable attributes: true SEF Froogle URLS: false More Pics: false Unknown Pics: false HTC: false SPPC: false Extra Fields: false File uploaded. Temporary filename: /tmp/phpvtCjRg User filename: EP-HeartsBox Collection-test.csv Size: 3493 | EM7766 | Long sleev | Long sleev | | 7766.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7762 | Long sleev | Long sleev | | 7762.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7760 | Off the sh | Off the sh | | 7760.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | 12 | Red | 0 | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7760Q | Off the sh | Off the sh | | 7760Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product! | EM7759 | Lace bra t | Lace bra t | | 7759.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7756 | Lace thong | Lace thong | | 7756.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7775 | Lycra stra | Lycra stra | | 7775.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7804 | Bustier, g | Bustier, g | | 7804.jpg | 27.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! | EM7804Q | Bustier, g | Bustier, g | | 7804Q.jpg | 28.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 5 | Queen | 0 | Taxable Go | Active !New Product! | EM7805 | Cami set, | Cami top, | | 7805.jpg | 26.99 | 25 | 1.5 | 01/11/2009 | 01/11/2009 | | HeartsBox | | For Her | | | | 1 | Color | 11 | Black | 0 | | | | 2 | Size | 25 | One Size | 0 | Taxable Go | Active !New Product! Have tried with define ('EP_EXCEL_SAFE_OUTPUT_ALT_PARCE', true); // default is: false and also set to false, but makes no diffence. http://bytesnkisz.com/
  8. Need some advice, I am trying to add 10 test products, but whenever I upload them using EP, it seems to add 17 products instead. The 10 test products have attributes and the 3 of them have a comma in the title and description, will this cause problems?, I am using MS Excel 2003. I have created a "complete" template, editted it and then saved it as a ms-dos csv and also as a csv file format, but still it always gives me 17 products. I have also manually added the 10 products into the store, then created the template to compare, its the same, when I upload the manual entered products csv, this then gives me the same 17 products, the out come of the below csv can be seen at my customers website site here: http://www.bytesnkisz.com/index.php Here are my details: CSV File : here EP vers: 2.76g osCommerce Online Merchant v2.2 RC2a OS: Linux 2.6.24.7 HTTP: Apache DB: MySQL 5.0.45-log PHP: 4.4.7 (Zend: 1.3.0) Temp Directory: /hermes/web01/b1438/pow.kbleyth/htdocs/temp/ Temp Dir is Writable Magic Quotes is: off register_globals is: off Split files on: 300 records Model Num Size: 30 Price with tax: false Calc Precision: 2 Replace quotes: false Field seperator: comma Excel safe output: true Preserve tab/cr/lf: false Category depth: 3 Enable attributes: true SEF Froogle URLS: false More Pics: false Unknown Pics: false HTC: false SPPC: false Extra Fields: false Any help is appreciated.
  9. tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Payment Address:', 'MODULE_PAYMENT_MONEYORDER_PAYADDRESS', '', 'Address to send payments to?', '6', '1', 'tep_cfg_textarea(\'\')', now());"); Trying to make a custom payment module, and need to have a textarea in the module on the admin control panel to add the payment address, but when I use the codes 'tep_cfg_textarea()', 'tep_cfg_textarea('')', 'tep_cfg_textarea(\'\')', They all return errors, whats the correct function, Anyone?
  10. The newer version 3.00+ are the same as 2.76g but with better install instructions, so if you have tried it with your version and it does not work, the neewer ones unfortunately won't make any difference. Hope this helps.
  11. Version 3.0.0 is just version 2.76d converted into html document wise and added a new easypopulate_help.php file. Hope this helps
  12. Added a new release of EP to the contribs section, its the same coding as Surfalots contribs but added a new file to the admin section that includes an online help section, basically, converted the support documentation into php and made viewable from the admin section, also combined all the documentation into one html file for easier viewing etc. Any problems let me know.
  13. Hi Jim, I won't steal your thunder, its all your work, the onloy thing I would do different with my code above is make it langauge independant, its set for english only, but a few changes to the defines, then it could be completely language universal, the script above is for a customers store of mine and they only sell in the UK, so english is all thats required. If I have time, will change it to be universal.
  14. If anyone is interested, here is my change_password.php file with a few cosmetic changes and the ability now to automatically email the customer with the new password (please note I have removed (commented out) the auto password generation) <?php /* $Id: change_password.php,v 3.0 11/23/2007 kymstion osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2007 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // Include the password functions require(DIR_WS_FUNCTIONS . 'password_funcs.php'); // Include the language definitions require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHANGE_PASSWORD); // // POST target -- the POST form has been sent to change a password // If a password change has been submitted, check the results for errors $pass = 0; if ($_POST['customer_id'] != '') { $customer_id = (int)$_POST['customer_id']; if ($_POST['new_password'] == '' && $_POST['repeat_password'] == '') { // Use generated password $pass = 1; $new_password = $_POST['auto_password']; } elseif ($_POST['new_password'] == $_POST['repeat_password']) { // Use custom password $pass = 1; $new_password = $_POST['new_password']; } elseif (empty($_POST['new_password'])) { // Missing password $pass = 2; } elseif (empty($_POST['repeat_password'])) { // Missing repeat password $pass = 2; } elseif ($_POST['new_password'] != $_POST['repeat_password']) { // Mismatched passwords $pass = 3; } // If all is well, make the changes to the database if ($pass == 1) { mysql_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_password='" . tep_encrypt_password ($new_password) . "' WHERE customers_id='" . $customer_id . "'"); // Get the customer's information for the success message $customer_name_query = mysql_query("SELECT customers_firstname, customers_lastname, customers_email_address FROM " . TABLE_CUSTOMERS . " WHERE customers_id='" . $customer_id . "'"); $customer_name = mysql_fetch_array ($customer_name_query); define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password Generated'); define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested for your account at ' . STORE_NAME . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is: ' . '%s' . "\n\n" . 'If you did not authorise this, please contact us immediately.' . "\n\n" . STORE_OWNER . "\n" . STORE_OWNER_EMAIL_ADDRESS ); tep_mail($customer_name['customers_firstname'] . " " . $customer_name['customers_lastname'], $customer_name['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } } // End POST section // // GET target -- a GET form has been sent // Build a SQL string from the Search or Customer variables $search_string = ''; if (isset ($HTTP_GET_VARS['search']) && strlen ($HTTP_GET_VARS['search']) > 1) { $keywords = tep_db_input (tep_db_prepare_input ($HTTP_GET_VARS['search'])); $search_string = "where customers_lastname like '%" . $keywords . "%' or customers_firstname like '%" . $keywords . "%' or customers_email_address like '%" . $keywords . "%'"; } elseif (isset ($HTTP_GET_VARS['customer'])) { $customer_id = (int)$HTTP_GET_VARS['customer']; $search_string = "WHERE customers_id='" . $customer_id . "'"; } // End GET section // // Variable fields to insert into the page // Build an array of customers for the select pulldown $customer_data_query = mysql_query("SELECT customers_id, customers_firstname, customers_lastname, customers_email_address FROM " . TABLE_CUSTOMERS . " " . $search_string . " ORDER BY customers_lastname, customers_firstname "); $customers_array = array(); while ($customer_data = mysql_fetch_array ($customer_data_query) ) { $customers_array[] = array('id' => $customer_data['customers_id'], 'text' => $customer_data['customers_firstname'] . ' ' . $customer_data['customers_lastname'] . ' (' . $customer_data['customers_email_address'] . ')' ); } // Set the correct message to display for password change or errors $message = ''; switch ($pass) { case 1: $message = '<b><font color=#009900>'; $message .= CUSTOMER_PASSWORD . $customer_name['customers_firstname'] . ' ' . $customer_name['customers_lastname']; $message .= PASSWORD_UPDATED . ' <font color=red>' . $new_password . '</font><br>An Email has been sent to ' . $customer_name['customers_firstname'] . ' ' . $customer_name['customers_lastname'] . ' to verify this change.<br>'; $message .= '</b></font><br>' . tep_black_line(); break; case 2: $message = '<b><font color=#ff0000>'. PLEASE_NEW_PASSWORD . PLEASE_REPEAT . '</b></font>'; break; case 3: $message = '<b><font color=#ff0000>'. ERROR_NEW_PASSWORD . PLEASE_REPEAT . '</b></font>'; break; case 0: default: $message = ' '; break; } // Set up the search form $search_form = tep_draw_input_field ('search'); $search_form .= tep_draw_hidden_field ('selected_box', 'customers'); $search_form .= tep_hide_session_id(); // Generate a random password and add it to the form $auto_password = tep_create_random_value (ENTRY_PASSWORD_MIN_LENGTH); $auto_form = tep_draw_hidden_field ('auto_password', $auto_password) . $auto_password; ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <?php if ($message != ' ') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo $message; ?></td> </tr> </table></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo tep_draw_form ('search', FILENAME_CHANGE_PASSWORD, '', 'get'); ?> <table border="0" width="600px" cellspacing="0" cellpadding="2"> <tr> <td width="170"><?php echo tep_draw_separator('pixel_trans.gif', '170', '1'); ?></td> <td width="150"><?php echo tep_draw_separator('pixel_trans.gif', '150', '1'); ?></td> <td width="280"><?php echo tep_draw_separator('pixel_trans.gif', '280', '1'); ?></td> </tr> <tr> <td class="main" colspan="3"><?php echo TEXT_SEARCH_INSTRUCTION; ?><br></td> </tr> <tr> <td width="170" class="main"><b><?php echo SEARCH; ?></b></td> <td width="150" class="main"><?php echo $search_form; ?></td> <td width="280" class="main"><?php echo tep_image_submit ('button_search.gif', IMAGE_SEARCH); ?></td> </tr> </form></table></td> </tr> <tr> <td><?php echo tep_draw_form ('password', FILENAME_CHANGE_PASSWORD, 'selected_box=customers', 'POST'); ?> <table border=0 width="600px" cellspacing="0" cellpadding="2"> <tr> <td width="170" class="main"><b><font color=red>OR</font><br><br><?php echo SELECT_CUSTOMER; ?></b><br><br></td> <td width="450" class="main"><br><br><?php echo tep_draw_pull_down_menu('customer_id', $customers_array);; ?><br><br></td> </tr> <tr> <td class="main"><b><?php echo NEW_PASSWORD; ?></b></td> <td class="main"><?php echo tep_draw_password_field('new_password'); ?></td> </tr> <tr> <td class="main"><b><?php echo REPEAT_NEW_PASSWORD; ?></b></td> <td class="main"><?php echo tep_draw_password_field('repeat_password'); ?></td> </tr> <!-- <tr> <td class="main"><b><?php echo AUTO_PASSWORD; ?></b></td> <td class="main"><?php echo $auto_form; ?></td> </tr> --> <tr> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '170', '1'); ?></td> <td><?php echo tep_image_submit ('button_change_password.gif', IMAGE_CHANGE_PASSWORD); ?></td> </tr> </form></table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> A big thank you to Jim Keebaugh, for his help in completing this modification :)
  15. Thank you, it works now, using the following code: // If all is well, make the changes to the database if ($pass == 1) { mysql_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_password='" . tep_encrypt_password ($new_password) . "' WHERE customers_id='" . $customer_id . "' "); // Get the customer's information for the success message $customer_name_query = mysql_query("SELECT customers_firstname, customers_lastname, customers_email_address FROM " . TABLE_CUSTOMERS . " WHERE customers_id='" . $customer_id . "' "); $customer_name = mysql_fetch_array ($customer_name_query); define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password'); define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested for your account at ' . STORE_NAME . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); tep_mail($customer_name['customers_firstname'] . " " . $customer_name['customers_lastname'], $customer_name['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } } Email received: A new password was requested for your account at Company Name. Your new password to 'Company Name' is: 12345 Just need to do a few cosmetic changes etc and should be perfect.
  16. Trying for the last 30 minutes to insert the above code, I think it should go in change_password.php after lines 100 but it don't work, can anyone see anything obciously wrong. // Set the correct message to display for password change or errors $message = ''; switch ($pass) { case 1: $message = '<b><font color=#009900>'; $message .= CUSTOMER_PASSWORD . $customer_name['customers_firstname'] . ' ' . $customer_name['customers_lastname']; $message .= PASSWORD_UPDATED . ' ' . $new_password . '<br>' . PASSWORD_UPDATED_REMINDER; $message .= '</b></font><br>' . tep_black_line(); define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password'); define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested for your account at ' . STORE_NAME . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); tep_mail($customer_data['customers_firstname'] . " " . $customer_data['customers_lastname'], $customer_data['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); break; also tried after line 57 // If all is well, make the changes to the database if ($pass == 1) { mysql_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_password='" . tep_encrypt_password ($new_password) . "' WHERE customers_id='" . $customer_id . "' "); // Get the customer's information for the success message $customer_name_query = mysql_query("SELECT customers_firstname, customers_lastname FROM " . TABLE_CUSTOMERS . " WHERE customers_id='" . $customer_id . "' "); $customer_name = mysql_fetch_array ($customer_name_query); define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password'); define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested for your account at ' . STORE_NAME . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); tep_mail($customer_data['customers_firstname'] . " " . $customer_data['customers_lastname'], $customer_data['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } } no emails ever received.
  17. Is there anyway, that the code can be changed to automatically email the new password to the user (as a confirmation), this will alert the customer to any unauthroised attempts to change passwords etc. i.e. define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password'); define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested for your account at ' . STORE_NAME . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n"); define('TEXT_PASSWORD_SENT_TO_CUST', 'New Password Sent To The Customers E-Mail Address'); tep_mail($customer_data['customers_firstname'] . " " . $customer_data['customers_lastname'], $customer_data['customers_email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
  18. Has anyone got this too work with RCA2, if so can they post there admin/categories.php file and catimagessetup.php files please. Getting no pictures added, warning file location does not exist
  19. Thx will give it a shot
  20. Hi all, just out on the web I came across this site: http://www.auctionpax.co.uk/packaging/mail...s-c-74_123.html Can OSC do this, which contrib would allow different sizes on one info page and allow checkout.
  21. I will look into the free post and see if I can modify the contrib. Just been a bit busy at work so have no time to play around, but due for a few days off, so will have a look then.
  22. stu2000

    Cpanel whm...

    it has been done as its incorporated into fantisico
  23. stu2000

    STS and Coolmenu

    Has anyone ever got coolmenu to work with STS, if so can they shed some light on the extra instructions required to get it to function.
  24. I have PM'ed "wheeloftime" stating my error and have asked for my part to be removed to avoid any confusion.
×