How to add custom filed to customers table – OpenCart – Admin panel

How to add custom field to custumers table in OpenCart?

OpenCart has many flaws, at least in version <2. Unlike WordPress for example there is no easy way to change core functionality with custom plugin without changing the source code. There is no pub/sub architecture for interrupting system events…

But if you need to add custom fields to custumer, here is code simple example for that in five simple steps.

Step 1

Add form html in admin panel :


// admin/view/template/sale/customer_form.tpl
// find <input name="firstname" type="text" value="<?php echo $firstname; ?>" />
// and add before :
<input name="#field_name#" type="text" value="<?php echo #field_name#; ?>" />

Continue reading How to add custom filed to customers table – OpenCart – Admin panel

Testing web app or site automatically on different screen resolutions

There is time when you need to test your site on different resolutions. Today there are many online solutions that provide easy way of testing you site on different resolutions. It’s simple done using iframe with custom dimensions. But what if you need to test your site on couple of hundred different resolutions :) ?

There is no better way to do that than using a automated test. Framework of choice for that is Selenium . It have numerous combination of programming language for creating tests with Selenium and web drivers.
Continue reading Testing web app or site automatically on different screen resolutions

PHP : __FILE__ problem with symolics links

Some time ago I have organized my wordpress plugins via symbolic links. It’s helped me to keep all plugins inside one repository dir and eases me to deploy plugins in different test wordpress locations on my WAMP server. Example of that organization :


d:\plugins\plugin1 // real loaction
d:\plugins\plugin2 // real location
...
d:\www\wordpress\wp-content\plugins\plugin1 // symbolic link
d:\www\wordpress\wp-content\plugins\plugin2 // symbolic link
...

Continue reading PHP : __FILE__ problem with symolics links

Hello world!

It’s have been a long time since I bought this domain and it’s about time to do something with it. ;)
So this is a new beginning for www.nikolaloncar.com and I hope that you find something helpful in this blog.