X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Changing the "customer notes" field at checkout to accept numbers only or limited cha (https://forum.x-cart.com/showthread.php?t=63794)

ayanai 05-30-2012 06:25 AM

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.O:)

cflsystems 05-30-2012 10:36 AM

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

ayanai 05-31-2012 12:58 AM

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.

cflsystems 05-31-2012 10:54 AM

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

ayanai 06-01-2012 01:32 AM

Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha
 
Thank you very much. God bless you.

ayanai 06-01-2012 05:31 AM

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?

cflsystems 06-01-2012 11:21 AM

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"

ayanai 06-04-2012 04:23 AM

Re: Changing the "customer notes" field at checkout to accept numbers only or limited cha
 
Thank You Very Much. Will Sure Do That.


All times are GMT -8. The time now is 01:40 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.