Wednesday 20 February 2013

Remove Latin or special char

To remove Latin or special char sed -e 's/[Ā]/A/g;s/[àâā]/a/g;s/[ọõ]/o/g;s/[íìī]/i/g;s/[êệ]/e/g;s/[ḥ]/h/g;s/[Ḥ]/H/g;s/[şṣ]/s/g;s/[ū]/u/g;s/[ʿ]//g;s/[Ṣ]/S/g;s/[Ṭ]/T/g;s/[ṭ]/t/g;s/[Ḍ]/D/g;s/[ḍ]/d/g' a.txt

Thursday 7 February 2013

Zen cart change number of zones from 3

(Zone by continent)

By default, the module comes with support for 3 zones. This can be easily altered with a coding change by editing the Zones Shipping Module file (If you make this change and your Zones module is already installed/active, you'll need to record your settings, then click Remove, then click Install, and re-enter all your settings. Otherwise your change will have peculiar visual side-effects).
/includes/ modules/ shipping/ zones.php // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 3; }
Next, you will want to activate the module by going to the Admin, point your cursor at Modules, then clicking on Shipping. A list of all shipping modules should appear. Click on Zone Shipping. Click on the install button.

Notes
1: Great Britain
2: Austria, Belgium, , France, Germany, Greenland, Iceland, Ireland, Italy, Norway, Holland/Netherlands, Denmark, Poland, Spain, Sweden, Switzerland, Finland, Portugal, Israel, Greece
3: USA, Canada
4: Japan, Australia, New Zealand, Singapore, Taiwan, China, Hong Kong
5: (Other, inc India, UAE)

When you enter these country lists, enter them into the Zone X Countries fields, where "X" is the number of the zone. They should be entered as two character ISO country codes in all capital letters. They should be separated by commas with no spaces or other punctuation. For example:
1: GB 3: AT,BE,FR,DE,GL,IS,IE,IT,NO,NL,DK,PL,ES,SE,CH,FI,PT,IL,GR 2: US,CA 4: JP,AU,NZ,SG,TW,CN,HK 5: 00

Sunday 3 February 2013

OpenBravo Tips

openbravopos.properties config file lives in '/home/' in Linux or 'C:\Document and Settings\' in Windows For example to test the printer is properly connected to the first serial port type: in Windows type test > COM1: in Linux echo test > /dev/ttyS0 See: http://wiki.openbravo.com/wiki/Projects:POS/Hardware_Installation_Guide If a serial connection is chosen, the configuration must be: bauds: 9600, data bits 8, stop bits 1 and parity none.

Friday 1 February 2013

Ubuntu 12.04 fixes

DNS fix for myself to go old school =================================== /etc/resolv.conf nameserver 192.168.1.254 nameserver 172.16.1.1 nameserver 208.67.222.222 nameserver 208.67.220.220 To turn off dnsmasq in Network Manager, you need to edit /etc/NetworkManager/NetworkManager.conf # Comment the 'dns=dnsmasq' line (put a # in front of it) then restart sudo restart network-manager # See: http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ List pakages dpkg --get-selections | grep java Removeing apt-get remove java-common To install latest java add-apt-repository ppa:webupd8team/java apt-get update apt-get install oracle-java7-installer Security checks http://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics eposn drinver http://download.epson-biz.com/modules/pos/index.php?page=prod&pcat=3&scat=32&pid=30