CRE Loaded Community

Banner


Board index » CRE Loaded Support » CRE Loaded 6.4

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: pUNCtuaTion HELp!
PostPosted: Wed Sep 09, 2009 1:25 pm 
Offline
CRE Freak

Joined: Thu Jun 25, 2009 6:58 am
Posts: 50
I am looking for a way to fix punctuation issues for customer input information. i.e. Name, Address, City, Phone etc..

Some customers do not care about punctuation and it makes for a messy database.

I am looking for a way to correct punctuation errors.

mary smith to Mary Smith
5555551212 to 555-555-1212
123 ANYWHERE DR. to 123 Anywhere Dr.


I have exported the customers using EZPopulate and also using MagneticOne Store Manager. I use the =Proper command and make all the corrections, it looks prefect in excel. When I upload the corrected customer file it screws up my database. When I check the orders all the customer information is gone. I am so glad I backed up.

Anyone have a solution for punctuation?


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Thu Mar 11, 2010 4:45 pm 
Offline
CRE Freak

Joined: Thu Jun 25, 2009 6:58 am
Posts: 50
No replies since June 2009 come on, this has to be a common issue for CRE users.


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Thu Mar 11, 2010 5:19 pm 
Offline
CRE Freak
User avatar

Joined: Thu Feb 28, 2008 9:09 pm
Posts: 53
Well this will require lots of code to be modified, need to convert each variable passed before adding to database.
ucwords(strtolower($string_variable));
in catalog/create_account.php around line 26

Find

Code:
  $firstname = tep_db_prepare_input($_POST['firstname']);
  $lastname = tep_db_prepare_input($_POST['lastname']);
  if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
  $email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
  if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
  $street_address = tep_db_prepare_input($_POST['street_address']);
  if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
  $postcode = tep_db_prepare_input($_POST['postcode']);
  $city = tep_db_prepare_input($_POST['city']);
  if (ACCOUNT_STATE == 'true') {
    $state = tep_db_prepare_input($_POST['state']);


and replace with

Code:
/* OLD CODE
  $firstname = tep_db_prepare_input($_POST['firstname']);
  $lastname = tep_db_prepare_input($_POST['lastname']);
  if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
  $email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
  if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
  $street_address = tep_db_prepare_input($_POST['street_address']);
  if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
  $postcode = tep_db_prepare_input($_POST['postcode']);
  $city = tep_db_prepare_input($_POST['city']);
  if (ACCOUNT_STATE == 'true') {
    $state = tep_db_prepare_input($_POST['state']);
*/
  $firstname = ucwords(strtolower(tep_db_prepare_input($_POST['firstname'])));
  $lastname = ucwords(strtolower(tep_db_prepare_input($_POST['lastname'])));
  if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']);
  $email_address = strtolower(tep_db_prepare_input($_POST['email_address']));
  if (ACCOUNT_COMPANY == 'true') $company = ucwords(strtolower(tep_db_prepare_input($_POST['company'])));
  $street_address = ucwords(strtolower(tep_db_prepare_input($_POST['street_address'])));
  if (ACCOUNT_SUBURB == 'true') $suburb = ucwords(strtolower(tep_db_prepare_input($_POST['suburb'])));
  $postcode = strtoupper(tep_db_prepare_input($_POST['postcode']));
  $city = ucwords(strtolower(tep_db_prepare_input($_POST['city'])));
  if (ACCOUNT_STATE == 'true') {
    $state = ucwords(strtolower(tep_db_prepare_input($_POST['state'])));


and in addressbook_process.php around line 38 Find

Code:
    if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
    $firstname = tep_db_prepare_input($_POST['firstname']);
    $lastname = tep_db_prepare_input($_POST['lastname']);
    $street_address = tep_db_prepare_input($_POST['street_address']);
    if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
    $postcode = tep_db_prepare_input($_POST['postcode']);
    $city = tep_db_prepare_input($_POST['city']);
    $country = tep_db_prepare_input($_POST['country']);
    $email_address = tep_db_prepare_input($_POST['email_address']);
    $telephone = tep_db_prepare_input($_POST['telephone']);
    $fax = tep_db_prepare_input($_POST['fax']);

    if (ACCOUNT_STATE == 'true') {
      if (isset($_POST['zone_id'])) {
        $zone_id = tep_db_prepare_input($_POST['zone_id']);
      } else {
        $zone_id = false;
      }
      $state = tep_db_prepare_input($_POST['state']);
    }


Replace with:

Code:
/* OLD CODE
    if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']);
    $firstname = tep_db_prepare_input($_POST['firstname']);
    $lastname = tep_db_prepare_input($_POST['lastname']);
    $street_address = tep_db_prepare_input($_POST['street_address']);
    if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']);
    $postcode = tep_db_prepare_input($_POST['postcode']);
    $city = tep_db_prepare_input($_POST['city']);
    $country = tep_db_prepare_input($_POST['country']);
    $email_address = tep_db_prepare_input($_POST['email_address']);
    $telephone = tep_db_prepare_input($_POST['telephone']);
    $fax = tep_db_prepare_input($_POST['fax']);

    if (ACCOUNT_STATE == 'true') {
      if (isset($_POST['zone_id'])) {
        $zone_id = tep_db_prepare_input($_POST['zone_id']);
      } else {
        $zone_id = false;
      }
      $state = tep_db_prepare_input($_POST['state']);
    }
*/
if (ACCOUNT_COMPANY == 'true') $company = ucwords(strtolower(tep_db_prepare_input($_POST['company'])));
    $firstname = ucwords(strtolower(tep_db_prepare_input($_POST['firstname'])));
    $lastname = ucwords(strtolower(tep_db_prepare_input($_POST['lastname'])));
    $street_address = ucwords(strtolower(tep_db_prepare_input($_POST['street_address'])));
    if (ACCOUNT_SUBURB == 'true') $suburb = ucwords(strtolower(tep_db_prepare_input($_POST['suburb'])));
    $postcode = strtoupper(tep_db_prepare_input($_POST['postcode']));
    $city = ucwords(strtolower(tep_db_prepare_input($_POST['city'])));
    $country = tep_db_prepare_input($_POST['country']);
    $email_address = tep_db_prepare_input($_POST['email_address']);
    $telephone = tep_db_prepare_input($_POST['telephone']);
    $fax = tep_db_prepare_input($_POST['fax']);

    if (ACCOUNT_STATE == 'true') {
      if (isset($_POST['zone_id'])) {
        $zone_id = tep_db_prepare_input($_POST['zone_id']);
      } else {
        $zone_id = false;
      }
      $state = ucwords(strtolower(tep_db_prepare_input($_POST['state']));
    }


this will solve 95% of your problem rest telephone number that have to be done using jscript during before post.

cheers

_________________
Ecommerce Solution Provider
Ecommerce, CRE Loaded, Customization
Get your CRE Loaded store done today. Data Entry, Ebay and Amazon Inventory Management


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Fri Mar 12, 2010 3:06 pm 
Offline
CRE Freak

Joined: Thu Jun 25, 2009 6:58 am
Posts: 50
You're AwEsOmE! 8)

Thanks for the fix it works perfectly. Do you have any tips on how to fix the punctuation errors that are already in the db?


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Fri Mar 12, 2010 6:19 pm 
Offline
CRE Freak
User avatar

Joined: Thu Feb 28, 2008 9:09 pm
Posts: 53
it will require some manual script to check and update all previous entries you can write it using the same

_________________
Ecommerce Solution Provider
Ecommerce, CRE Loaded, Customization
Get your CRE Loaded store done today. Data Entry, Ebay and Amazon Inventory Management


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Sat Mar 13, 2010 2:59 pm 
Offline
CRE Freak

Joined: Thu Jun 25, 2009 6:58 am
Posts: 50
Quote:
I have exported the customers using EZPopulate and also using MagneticOne Store Manager. I use the =Proper command and make all the corrections, it looks prefect in excel. When I upload the corrected customer file it screws up my database. When I check the orders all the customer information is gone. I am so glad I backed up.


Any idea why it would crash the db?


Top
 Profile  
 
 Post subject: Re: pUNCtuaTion HELp!
PostPosted: Sat Mar 13, 2010 6:23 pm 
Offline
CRE Freak
User avatar

Joined: Thu Feb 28, 2008 9:09 pm
Posts: 53
Not much experience with EZ Populate, but the order table is separate from customers.

_________________
Ecommerce Solution Provider
Ecommerce, CRE Loaded, Customization
Get your CRE Loaded store done today. Data Entry, Ebay and Amazon Inventory Management


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Board index » CRE Loaded Support » CRE Loaded 6.4

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Wed Feb 08, 2012 8:14 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

Follow Us on Twitter

An error occurred

Oops, an error seems to have occurred. We're sorry for any inconvenience this might have caused. If the error persists, feel free to tell us about it.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy