5 Things You Must Know About Packaging Your Magento Payment Extension
I wrote a payment plugin over the weekend and would love to package it for shipping. Magento documentation was not helpful because it is not clear on the process of getting this done. I have compiled five salient things you need to know when packaging your extension.
Let's run through these steps and never forget any of them.
1. Your extension should be working already
You must have your extension written into your magento build and have it work the way…
List of Payment Gateways Documentation in Nigeria
I have noticed getting the documentation for Nigeria payment platforms is like the hardest thing to come by. You rarely get it anywhere on the internet. I would be aggregating the links and documents I have so as to save someone from trouble. You can find below the table of platforms and their documents. You can drop comments of documentations you have that I have not listed so we can ease someone's stress.
Open Cart 2.0 $this->model_checkout_order->getOrder() method does not convert cart total on multiple currency site
If you have multiple currency configured on your OpenCart 2.0 eCommerce application you will notice that order total is not being converted from the default currency to the other configured currencies. I won't say this is a bug but it works just fine in lower version of OpenCart.
Anyway, if you are in this dillemma, you would have to manually convert the total. Below is how your code currently looks like:
$orderinfo = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$data['ordertotal']…
UTC Server Date Timezone conversion on Browser
Got some issues converting date from the server to the timezone of the user viewing it. You can imagine displaying date and time from the server and the user can not see it interpreted in his/her own timezone. I solved this on a project and would like to share my solution so I can save someone from stress. Below is the javascript to use.
function timezoneConverter(mydate){
var d = new Date(mydate);
d.setUTCFullYear(d.getFullYear());
d.setUTCMonth(d.getMonth());
d.setUTCDate(d.getDate());
d.setUTCHours(d.getHours());
d.setUTCMinutes(d.getMinutes());
d.setUTCSeconds(d.getSeconds());
return…
[SOLVED] Call to undefined method PhalconMvcViewSimple::disable() - Phalcon 2.0.0
There is a little bug in Phalcon 2.0.0, trying to reference a method that does not exist again in View class. This method existed in version 1.3.4 but somehow was removed.
let dependencyInjector = this->getDI();
if !header {
let url = dependencyInjector->getShared("url"),
header = url->get(location);
}
if dependencyInjector->has("view") {
let view = dependencyInjector->getShared("view");
view->disable();
}
Whoever has removed…
How to get your Pascal Code to work on MacOX
A friend wanted me to help with some assignments on Pascal and it really got funny how I couldn't easily install the compiler on MacOx so I decided to put up some blog post for someone who would also like to do same.
You would need Xcode to be installed before FPC is installed. Visit Free Pascal (http://www.freepascal.org/download.var) and download the installation file. Double click on the .dmg and follow the prompt to install. It will be installed in /usr/local/bin.
The…
How to Successully Migrate your WooCommerce Store from Local/One Domain to another Domain/Remote Server
You can guess I have been doing more stuffs with WooCommerce. It is lovely working with a commerce system built into WordPress. I am not a wordpress person anyway but WooCommerce rocks. I think I should find some time to review Open Source Carts.
A friend asked me to help him move his WooCommerce store to another domain then it became clear to me that I have not had enough time with WordPress. I intentionally decided not to dive into WordPress despite all the buzz about it. Almost every…
Free Plugin to Customise Your WooCommerce Forms
One of the fom fields you want to disable on your WooCommerce srore is Post Code. I wonder why lots of stores keep this field on a Nigeria site. It is the little whistle blower that shows your application is either a whitelisted one or just an Open Source. Though there are other things that give hints about the source of an application, forms fields that are not needed shouldn't be part of the form presented to users. I have received several calls from different people asking for the post code…
Downgrading your Phalcon framework to a lower version - MacOX
Phalcon just moved to version 2.0 and getting information on how to downgrade your version of Phalcon on Mac is not easy to come by. I did this for a colleague and would like to share the steps to do this with anyone having this same challenge.
Downgrading your Phalcon version implies you would probably be building your Phalcon yourself. Follow the following steps below:
Regex for specific email domain - PHP
I ran into the issue of checking emails with regex to be sure it is only valid for a specific domain. I searched through the internet for hours without reasonable joy, so I decided to write mine. I am not sure how perfect this looks but it just works for what I needed it for.
If you have this same issue, below is the pattern I used.
/[_a-z0-9-]+(\.[_a-z0-9-]+)*@(?i)mydomain.com/
You can savely change "mydomain" to whatever you want.
I…
[SOLVED] Mod-Rewrite is not enabled - Phalcon
I ran into this funny error and almost got me pulling my hair. My development branch has been working so fine until I fixed a merge conflict on a branch and the whole story began.
Looking for so long into this probelm I realised that looking for how to enable your mod_rewrite is not the issue for me. The real issue is with the htaccess file. My virtual host configuration is pointing to the project root and htaccess file is not there.
In Phalcon,…
6 things you must not forget when integrating with GTPay
I had some interesting moment integrating GTBank payment gateway for a client recently. I wonder why so much have changed about the integration. It is funny you can't have a straight integration without escalating to GTBank support team; that is if you are lucky to talk to someone knowledgeable. The banks gateway have not been interesting because the support team have little knowledge of the platform.
I have created this blog post to help you with smooth integration, so you can do less…
[SOLVED] Dispatcher has detected a cyclic routing causing stability problems - Phalcon
I was recently working on a Phalcon project and came across this error "Dispatcher has detected a cyclic routing causing stability problems" while trying to restrict access to some controllers. Apparently this looks like an unending loop.
Doing some more research I saw this "If the dispatch loop makes more than 256 loops it throws this exception. Normally this is caused because the application continue making forwards over and over without exiting the dispatch loop. https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/dispatcher.zep#L378".
Here…
Reading CSV file with newline as delimiter - PHP
I got some issues working with a CSV file with newline delimeter. I want to read the file and be able to process the content. I was so confused what the deliter would look like. After solving this I decided to share with everyone who has this same problem. I guess this would save somebody some from sleepless night.
Below is the code that did the magic.
//CSV…
Git ignore file name change
I don't really think this worth bloging anyway but I would like to have it noted. I renamed a file and git was not tracking it. It shows nothing new to commit while my file name has changed from a small letter to capital. I guessed my file case must have been ignored.
If you have this same challenge, below is what saved me:
git config core.ignorecase false
Go to your terminal and type that. Git has a configuration setting that tells…
Who are the real money lenders; The Telecommunications or The Banks?
On our way for another meeting, Biyi asked the question again, “Who is the real money lender?” which struck yet another cord in me. I could vividly remember when Airtel started lending their customers airtime, it came at first as a magic of the millennium as this became a reality in Nigeria. I was truly amazed and I clapped for the success of this idea.You can't but applaud the Business development units that came up with such a great idea.
There are no doubts that, lots of intelligence…
Project 2512 – A gift to a special follower of my blog on my birthday, 2015
My birthday is around the corner again. I am still in the spirit of celebrating it in a special way. I want to be busy putting smile on someone's face while people are wishing me “Happy Birthday”.
There are many people with great ideas and concepts for the web. These people have fantastic ideas that they believe would take them to their promise land but they can't afford the cost of a developer. To be candid, CPUs are cheap but Developers are not.
In…
The simplest explanation of Dependency Injection (DI)
Many friends have asked me what the concept of Dependency Injection is all about. I have explained this over and over so I decided to have it written so I would direct the next person that ask me to this post. New frameworks have pride this feature and they make it look like something totally new. Anyway, the name might be new but the concept is not #lol.
Dependency Injection is probably one of the most simple design pattern concept. And odds are you have probably already used it. But…
[SOLVED] beforeSave() model method not working in Phalcon
A friend found out there is what we can refer to as a little bug in Phalcon beforeSave() model method. Even though you override it, it still doesn't work. Let me use an example to describe this
class Car
{
public function beforeSave()
{
$engine = [];
// Create a Car first Engine
$engine[0] = new Engine();
$engine[0]->name = 'Toyota';
$this->engine = $engine;
}
}
$car = new Car;
$engine…
5 things you need to know when migrating your OpenCart Payment extension from 1.5.x to 2.0.x
I got a call from a friend requesting that I helped him port his OpenCart Payment extension/pluggin from 1.5.x to 2.0.x. It is funny there is rarely a place you can get information about migrating your OpenCart 1.5.x extenion to 2.0.x, so I deceided write one.
Here are five things you need to know or take note of when migrating your OpenCart Payment extension/plugin.
1. Change all $this->data[''] to $data[''] in your controllers.
2. From the admin…