Launch of The Gift Company website
Filed under General, PHP / MySQL, Programming, Projects by Brett Reid at 01:03am August 3rd, 2008The Gift Company approached Jackie and I to help them with a complete makeover of their (now archived) old site. The old site had served the previous owners of The Gift Company well but the new owners, Graham and Michelle, wanted to carry through the new branding onto the website.
The new site needed to allow engaged couples to register and create an online Bridal Registry by adding products from the website. Each couple would have their own unique url (eg. www.thegiftcompany.co.za/amanda-and-dave) for their registry, friends and family could then visit this page and purchase items off their bridal list. Visitors to the site would need to be able to purchase products seperately too.
I built the site using Zend Framework. I chose ZF because of it’s flexibility, power, speed and potential to scale if need be. For the ecommerce part of the site, I recommended PayGate. I have worked with PayGate about 4 times now but this was the first time I’ve worked with their new SecureCode option. Their documentation is really good and it’s not much different other than the extra verifcation step. I went through some of the code I had written on previous PayGate solutions and then wrote one for ZF. I wrote a PaymentGateway ‘factory’ to use as a loader and then wrote the PayGatePayXML class. The cart system uses AJAX and I wrote a ‘mini-api’ in the CartController to allow for more secure ajax requests and to plug into flash (if need be). I built an indexed search for Products and Bridal lists but had a lot of issues with this during launch thanks to a certain automated script. The ZF search class has to create an index lock for each search. It turns out Hetzner (hosting company) have a script which runs at 10pm each night altering ownership of files (including index.lock). So each morning we’d be getting errors thrown on search. Solution was a cron job at Hetzner resetting ownership back but debugging that wasn’t fun!
I am very happy with The Gift Company website from every angle. ZF ensures that the code you write is reusable and I hope to publish the PayGate v4 class once I’ve refined it a bit more.

