PrestaShop - Developer Notes

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. Read On →

PHP Weekly Email Newsletter Archive

If you fancy some php reading and watching suggest you check out this PHP newsletter: http://phpweekly.info/archive/

Setting a Magento Store Design Programatically in Installer using PHP

I needed to set up a design change for a new store which I was programatically creating. One aspect which I was still doing manually was the design change. Lots of tutorials on the web suggest how to accomplish this in the Admin, but this wasn’t what I was after. I’ve done this by updating the store’s config as shown below. Hope it helps someone out there too $config = Read On →

PHP API Development Logging and Debugging

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));

Apache Log File Analysis Script

Here is a little bash script we knocked together to track down some malicious activity on a clients server. Using a bit of awk etc to parse the log files we could quickly track down an IP address that was overloading the server and then take steps to block that person. Here is the script: #!/bin/bash ###### SETUP ############ LOG_FOLDER=/var/www/vhosts/domain.co.uk/statistics/logs ACCESS_LOG=$LOG_FOLDER/access_log HOW_MANY_ROWS=20000 ######### FUNCTIONS ############## function title() { echo " Read On →

Bash timeout and copying text in vim

I have been working with a server that had been configured differently from the way that I prefer. The two biggest complaints that I had about it were that the timeout was set very low, meaning that the connection would break off every five minutes, and that vim had been set up so if you selected text using the mouse you could not copy it. The solutions to these two problems are as follows. Read On →