March 19, 2013
No Comments
PrestaShop is a fully featured shopping platform and offers much of the functionality that other eCommerce shopping platforms do. Compared to, for example, Magento PrestaShop is significantly simpler to develop for.
Here is the run down of the key aspects that any one building a web site on PrestaShop should be aware of.
Modules
PrestaShop is based around a modular design which is quite similar to Joomlas module system.
A modules presence and position on the front end is defined by hooking the module into a particular section on the frontend. There are loads of hooks that can be used. Most modules will add them selves to the hook they think is most appropriate on install. The ordering of modules also defines the order they appear in a given hook.
A key point of managing modules that can easily be over looked is that you can grab and drag modules in a given hook by clicking and holding the position change buttons.
Themes
Off the shelf themes are usually not simply a new set of templates and CSS but also modules as well. Quite allot of themes are built around specific modules being in specific hooks some times in a specific order.
Creating your own module
Defining your own module is really straight forward:
Create a folder in modules called my_module.
Create a file called my_module.php, in this file create a class called My_module which extends Module.
Create a config.xml with the following template:
my_module
My Module
1
A test module, it does nothing
My self
front_office_features
0
1
Done, the module will appear in the module list but do nothing. You can look at the base module class to see all the function available that get called by PrestaShop are different times to do what you need to do.
If you fancy some php reading and watching suggest you check out this PHP newsletter: http://phpweekly.info/archive/
March 14, 2013
No Comments
If you are ever working with API integrations, either in or out bound, then it might be useful to set up a simple dumb logging system to assist you with developing and debugging things.
Here is a really simple snippet to help you along with that.
It literally takes exactly what it has received and logs it with no messing about. Brilliant!
<?php
$log['raw_input']=file_get_contents('php://input');
$log['_POST']=$_POST;
$log['_GET']=$_GET;
file_put_contents('inboundXML.log', var_export($log, true));
March 11, 2013
No Comments
The function below is one that we have used a few times to allow certain “admin only” assets to be accessed or visible on the front end of a website.
The theory is that the htaccess file in the admin folder will be kept up to date and can therefore be used as the authoritative list of IP addresses that are allowed to access admin assets.
This function is simple enough and should be useful anywhere that you use htaccess to protect a certain folder and would like to implement the same white list rules in other places without having to maintain a duplicate list of authorised IP addresses.
The function also uses static variables – a lesser known bit of PHP functionality which can be a nice easy performance optimisation when working with procedural PHP code. If a function will be called many times and will always return the same result in a single request, you can actually cache that result to a static variable and serve that on any subsequent requests.
function isAllowedIp() {
static $pass = null;
if ($pass !== null) {
return $pass;
}
$pass=false;
$customer_ip = $_SERVER['REMOTE_ADDR'];
$htaccess = file_get_contents('admin/.htaccess');
preg_match_all('%allow from ([0-9.]+)%', $htaccess, $matches);
foreach ($matches[1] as $ip) {
if ($ip == $customer_ip) {
$pass = true; //this is stored statically for perfomance reasons
return true;
}
}
return false;
}
php, By:
Joseph Edmonds
No Comments
Tags:
access,
allow,
authorisation,
control,
deny,
function,
htaccess,
ip address,
list,
php,
procedural,
static,
tip,
variable
March 4, 2013
No Comments
If you have a Magento site then there are no doubt certain aspects of the maintainence and management of the web site that you would appreciate a little help with. This might range from things like upgrades down to one on one training and support in using the platform. If that sounds good to you then read on about our Magento support service.
Edmonds Commerce provide this kind of ongoing monthly support services to a number of clients. We work with you to get the most out of your store, assisting with things like getting it running as quickly as possible, updating plugins and investigating and fixing issues and bugs.
With a powerful and complex platform such as Magento, we find that this kind of wrap around support is really valuable to our clients so that they can ask us when things don’t make sense and generally make sure they are doing things the best way to get the maximum advantage of the platform.
Magento Support Monthly Package
Monthly support packages include a discounted hourly rate for a set number of hours. We will agree with you a number of hours per month and will then schedule this in a way that suits your requirements. For some people a small number of hours every week is best. For others it makes more sense to have a chunk of time once a month with time in between to build up a list of requirements for the next batch.
Find out More
If you would like to discuss our Magento monthly support arrangements, please fill out the contact form below or give us a call on +44 (0)1274 590036
March 1, 2013
No Comments
Buckley is a UK based company that prides itself on designing and manufacturing high quality fashion & costume jewellery at competitive prices since its inception in 1989. The company has rapidly expanded into a worldwide brand with jewellery collections available to a vast market of over 200 stores including more than 60 Duty Free shops and 120 airlines . We are glad to hear that Buckley has contributed over US$3 million to the funding of the Royal British Legion through the sale of its elegant Buckley Poppy.
The development idea:
Buckley Jewellery was initially launched using WordPress and used an ecommerce package called ShopperPress. As the company grew and they started to expand their business to Duty Free shops and airlines, it became apparent that WordPress could not provide enough support for their complex modifications and customisations. This is when the idea of re-building the site in Magento was suggested.
We started working with Buckley in 2011 and have been providing them with continuous support since then. Some of the main requirements were broadly to do the following:
1. Magento implementation and migration from previous platform
We installed and configured Magento onto Buckley’s chosen hosting platform and installed the essential extensions such as shipping and payment gateways including PayPal and SagePay. We also migrated all of their products, customers and orders database from the previous platform into Magento. A clean and clear design was created and customised to their specification and we have been tweaking it per their needs and requirements ever since.
2. Magento training
After successfully migrating the site to Magento, we did an on-site one day introduction course with Buckley, where we gave them the background understanding and some useful skills required to get the most out of their new Magento store.
Here is a quote from Mark at Buckley Jewellry: “The day was extremely useful with just the right amount of content to set us on our way.”
3. Magento upgrade and Magento security patch applied
It is important to make sure that your Magento site is up to date. We have done two upgrades for Buckley so far and they all went really well.The upgrades were done in three separate phrases – exploratory upgrade, bugs fixing and deployment to live. We hit a few bugs but managed to fix them within hours.
Around mid July 2012, a serious security hole was found in Zend Framework which allow hackers to gain access to mysql server credentials. A patch was quickly applied to Buckley live store using a nice Bash script we put together. We offered this free security patching service to all Magento sites with a voluntary charity donation and had a lot of sites take us up on this offer.
4. Ongoing support
Buckley have joined our retainer scheme where we provide them with daily maintenance supports, bugs fixing and consultation services. Various firesale promotions, extensions and marketing exercises were installed and configured into their website.
Recently we had migrated Buckley and its sister site Attwood & Sawyer to a dedicated server, which is faster, more secured and gives them better control over the sites.
Buckley also engages in designing beautiful vintage inspired pieces in the silver Bouton rages and we are currently managing the merger process of Bouton into Buckley main sites.
Testimonial
Here is a quote from Mark Noble, IT Manager at Buckley Jewellery:
“Buckley Jewellery originally approached Edmonds Commerce to take our existing site and develop it onto a Magento platform. Since this first project we have used Joseph and his team for a further website and additional work to develop & expand our ecommerce business. The offer of installing the Magento patch across our websites was typical of a company who provide an honest and refreshing approach to website design. I would not hesitate to recommend Edmonds Commerce for any ecommerce development and advice”.

February 25, 2013
No Comments
As you might be aware, the UK PHP Conference was held in London last weekend. Having been the lucky winner of a ticket from PHP NW I went along.
The Venue
The conference was held in The Brewery in London city centre, a well suited conference centre with a variety of different conference rooms. An old Whitbread brewery, it was modern and practical while still maintaining enough of its history to keep its character. Overall the venue was great and it was good to have the variety of different rooms for all of the different events
The talks
The talks on offer were on a wide variety of subjects, varying from the very specific libraries to things of use to any PHP developer. Each of the talks was led by a volunteer giving up their time to speak about a subject for which they held a passion, it came across very well and as ever is good to hear from active members of the community.
Talks I found to be of particular interest were
- The Future of the PHP Development Environment A practical introduction to Vagrant, demonstrating its purpose in creating a reliable, predictable server environment. Covered was the installation, configuration and use of the software
- OpenStreetMap for the Web An enthusiastic demonstration of the power of having openly accessible data of the world’s maps and the APIs which enable a plethora of different applications
- A Hands-On Introduction to Writing Unit Tests Using PHPUnit A very practical (with live coding and demonstration of the Unit Tests, a risky move that paid off) intro to unit tests in PHP. Aimed at the very beginner, it started slowly with very simple tests but showed the power of them in much bigger projects
In summary
I thoroughly enjoyed the day, and would recommend anyone wanting to attend in future. The talks will be posted on the PHP UK website in the coming weeks so you should be able to get a sample of the events there
Edmonds Commerce employs a team of specialist PHP web developers who are all Zend Certified Engineers. This is a highly respected PHP qualification that ensures the highest standards of PHP development expertise. By achieving this certification we ensure that our developers have the kind of well rounded and deep understanding of the PHP language that can be utilised to achieve the highest quality production.
All of the e-commerce platforms, such as Magento and OpenCart are written in PHP and so the first thing to be sure of when you have a developer working on your projects is that they are very skilled in PHP itself as well as having an expert knowledge of the platform.

You can read all about the ZCE exam here.
In a nutshell the exam is designed to test knowledge and skill that a professional PHP developer would need to tackle the kind of day to day issues they are likely to face. The exam covers a broad range of topics and really tests the in depth and broad knowledge of PHP that is required to really get the most out of the language and deliver the highest quality PHP development.
featured, By:
Joseph Edmonds
No Comments
Tags:
certification,
developers,
development,
engineers,
exam,
php,
qualification,
web,
zce,
zend
February 22, 2013
No Comments
As part of our retainer services we offer Ritesim.com an ongoing monthly support service for their busy Magento site. This includes assistance with things like upgrades and bug fixes along with phone support and much more.

Ritesim.com International Phone Cards
February 20, 2013
No Comments
As part of our white label service we provided the development and design implementation requirements for a large London agency to deliver a high quality Magento site on budget and time.
The site required some customised functionality along with a full bespoke design implementation.

featured, By:
Joseph Edmonds
No Comments
Tags:
aws,
bespoke,
design,
implementation,
linux,
magento,
mysql,
php,
phpstorm,
white lable