Thursday, February 19, 2015

Opencart fix, show the shipping method in orders admin page and filter by shippingmethod

it turns that this should be a common feature for opencart admins, basically the operation team would like to see orders with priority shipping method and process those orders first. on 1.5, no way you can see this at once. basically the orders page looks like this by default

image

they actually want to see the UI like this, with shipping method on the overview

image

even more, they want a filter to see all orders with priority shipping selected.

image

To fix this, pretty straight forward. change the orders module/controller/template file, to include shippingmethod in the data query back. and add a filter logic to narrow down records.

I have a patch file, email me if you are interested. click about me on the page to get my email

Wednesday, February 11, 2015

C# merge sorting vs insert sorting

Quick test for a 50K random double array with random order, to soft it using the system libarry  and my own insert sorting/ merge sorting, the time takes to do the soring is quite different.

given a array with size 50K of  double values,

image

if increase to 100K, more time for insertion sorting

image

 

https://github.com/ryandh/CSharpSortingInsertedMerged/blob/master/Program.cs

Friday, February 6, 2015

Jquery , Simple plugin with default options

check this sample fiddler, http://jsfiddle.net/androidyou/dox5x8pp/

basically, we can use the $.extend to assign a default value if options are not assigned.

image

if you put default option,

image

image

 
Locations of visitors to this page