Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Changing the "customer notes" field at checkout to accept numbers only or limited cha
 
Reply
   X-Cart forums > X-Cart 4 > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-30-2012, 06:25 AM
 
ayanai ayanai is offline
 

Newbie
  
Join Date: May 2012
Posts: 8
 

Smile Changing the "customer notes" field at checkout to accept numbers only or limited cha

I use x-cart 4.4.5 as downloaded without any add-ons. Would anyone know how i can change the customer notes field to accept just 32 characters, and if possible, just numbers. I want that big field space gone. I want to use that section to capture manual payments numbers.
__________________
X-Cart 4.7.9 Gold.
LAMP stack.
Skrill, MoneyGram, & Western Union accepted.
PayPal not supported in my country.
Reply With Quote
  #2  
Old 05-30-2012, 10:36 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,697
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

You know this is illegal - if you refer to CC number
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 05-31-2012, 12:58 AM
 
ayanai ayanai is offline
 

Newbie
  
Join Date: May 2012
Posts: 8
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

You did not understand my post so I will write a very very detailed response.


I want to use manual processing and i will be accepting mobile payments. I do not even want to use credit cards on my site and I will not even want CC details of any sort.


Where I and my customers live, in Africa, people can pay via mobile. Credit cards are rare and virtually useless except at ATMs and less than 4% of the banked population even HAVE them.


When someone pays for something using their mobile phone, he sends an SMS to a particular phone number say 911. He then receives a confirmation SMS that tells him that he has paid 911 $x and the transaction id (similar to a invoice number) is 1234etc. The transaction id is limited to 32 characters, that is how long it will be and it will be in the payment confirmation sms.


Now, banks in Africa and even telecoms companies are afraid of anyone linking to their system so they only offer manual payment means.

So, to capture details of the confirmation sms which also includes many useless words, I decided to change my x-cart to such a way that, at the checkout page, instead of getting “customer notes”, I will use that field to get the transaction id of the mobile payment. I will change the “customer notes” text with webmaster mod. That way, when someone pays for an order, he can enter that transaction id, which I will use to authenticate the manual payment.


I don’t accept credit cards. Credit cards are not a big hit in Africa, in fact, many people with credit cards to not even use them at all, let alone online.


Africa is the world leader, number one, when it comes to mobile payments systems. You can find out about Mpesa from Wikipedia.


So going back to x-cart, if you look at the checkout page in X-cart (where you enter details of your order like address etc), the “customer notes” section is very big. I don’t want people to end up entering long text of the confirmation SMS messages with the transaction id buried somewhere in them. I want people to only enter the number of the transaction id. That can only happen if I limit the field to one line of just 32 characters.


So what I am asking is, is there anyone who knows how I can (1) limit the “customer notes” field to just 32 characters, or (2) how to limit the “customer notes” field to just 32 numerical characters.


So going back to my example, at checkout, the customer will choose to pay via mobile and send mobile payment to 911. He will then receive confirmation sms on his mobile phone that he paid 911 and that the transaction id for this payment is 1234etc. he will then enter 1234etc in the “customer notes” section which will now be called “transaction id” as proof of payment. I will then use that to validate the payment.


I hope you got that clear.
__________________
X-Cart 4.7.9 Gold.
LAMP stack.
Skrill, MoneyGram, & Western Union accepted.
PayPal not supported in my country.
Reply With Quote
  #4  
Old 05-31-2012, 10:54 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,697
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

You can modify that template and replace <textarea> with <input type="text" size="32" maxlength="32" ....> which will make it 32 characters limit. As for the numbers only part you can apply some javascript that will check this. You will also have to do the same in the php script - server side check - to make sure posted data is good
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
ayanai (06-01-2012)
  #5  
Old 06-01-2012, 01:32 AM
 
ayanai ayanai is offline
 

Newbie
  
Join Date: May 2012
Posts: 8
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

Thank you very much. God bless you.
__________________
X-Cart 4.7.9 Gold.
LAMP stack.
Skrill, MoneyGram, & Western Union accepted.
PayPal not supported in my country.
Reply With Quote
  #6  
Old 06-01-2012, 05:31 AM
 
ayanai ayanai is offline
 

Newbie
  
Join Date: May 2012
Posts: 8
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

I went to skin>common_files>customer>main> checkout_notes.tpl
And changed the line:


<td><textarea cols="70" rows="10" name="Customer_Notes"></textarea></td>


To


<td><input type="text" id="textarea" size="32" name="Customer Notes" maxlength="32" /></td>


And on the checkout webpage there was no change. Tried it for hours but saw no change. Even changed emptied the browser cache and still nothing.


I have really tried. Could I be editing the wrong file?
__________________
X-Cart 4.7.9 Gold.
LAMP stack.
Skrill, MoneyGram, & Western Union accepted.
PayPal not supported in my country.
Reply With Quote
  #7  
Old 06-01-2012, 11:21 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 13,697
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

You could be editing the wrong file. Use the webmaster mode to find out which one exactly you need to edit. Also "name' is "Customer_Notes" not "Customer Notes"
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
ayanai (06-04-2012)
  #8  
Old 06-04-2012, 04:23 AM
 
ayanai ayanai is offline
 

Newbie
  
Join Date: May 2012
Posts: 8
 

Default Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha

Thank You Very Much. Will Sure Do That.
__________________
X-Cart 4.7.9 Gold.
LAMP stack.
Skrill, MoneyGram, & Western Union accepted.
PayPal not supported in my country.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:36 AM.

   

 
X-Cart forums © 2001-2020