5ummer5 Posted May 23, 2010 Share Posted May 23, 2010 Hi all,In the backend when you enter a voucher I notice that it automatically transforms the text to be displayed as uppercase with CSS. This is nice however the vouchers are case sensitive! If you accidentally hit the caps lock or just use shift out of habit then some of the code will be lower case and some will be upper (in the system) yet it will all be displayed as upper.I found this quite annoying. I know vouchers should all be uppercase anyway so that's how I will input them! So I have removed the section of code that transforms the text automatically to uppercase. I thought I would post this up in case anyone has had the same issues!The file you need to edit is youradminfolder/tabs/AdminDiscounts.phpYou need to edit line 162 which looks like this <input type="text" size="30" maxlength="32" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" style="text-transform: uppercase;" id="code" /> and remove style="text-transform: uppercase;" Then you will be able to see if you have made any errors and can correct them before saving. To also change how it is displayed in the list of vouchers you need to go to css/admin.cssYou need to edit the class starting on line 710 which will look like this .discount_name { background: #FFEBCC; padding: 2px; text-transform: uppercase; } remove or comment out text-transform: uppercase; Thats it you are done! Now you will be able to see if you have mistyped the voucher without getting complaints from users saying they aren't working!Please note: The best practice for vouchers is to have them in capitals which is why the code is the way it is! But removing this and making sure you enter the code yourself in capitals will prevent any issues in future!Hope this helps! If you find this useful or have any questions let me know!Thanks Link to comment Share on other sites More sharing options...
Recommended Posts