Google Drive Adwords PPC Dashboard



I have recently had to create a Google Drive Spreadsheet to report on Google Adwords data, to do this you actually report on Google Analytics Adwords Data as for reasons I won’t get into data between Analytics and Adwords does vary.

As it is all Google products it means that Google Spreadsheets and Google Analytics will work together. The result is that you can do some calculations to report if Adwords is actually bringing in the money that you think it might be. I have set my dashboard up with both ROI and CPA depending on which you prefer to report on as I know there are arguments for both.

I will supply the script on request, however the basics are you use the Script Editor and then set up triggers to automate the process. Once you have a spreadsheet with raw data you can then use formulas to manipulate the data.



Philliskirk Drainage

I have recently just finished the Philliskirk Drainage website, there existing website was possibly one of the first ever on the internet now they have a new WordPress based platform for them to content manage themselves. Who doesn’t enjoy a website with diggers and tractors?

Philliskirk Drainage 

This will be now followed up with an SEO campaign to ensure they are ranking for their desired keywords.

Magento and UK Mail Integration

With the falling of City Link earlier in the year it was time for a new courier for a lot of people. UK Mail seemed to be the closest fit for a lot of people that used to use City Link, they seemed to have systems in place to allow the integration of Magento. A quick Google search of UK mail Magento will provide you with a plugin, a chat with UK Mails IT team suggests they wouldn’t support anything to do with it. Back to the drawing board.

It turns out the UK Mails software Consignor can handle file imports, so the installation of Xtento’s Order Export module outputting the orders into files on the server and FTP bridge to the local machine allows for the importing of orders automatically into Consignor with labels being printed automatically too.

Next returning the tracking numbers to Magento, two options here either use the FTP bridge to push the files with tracking numbers in back to the server or request FTP access from UK Mail. By requesting FTP access from UK Mail you can get back not only the tracking numbers once they are scanned onto the collection van but also you can get scan history and import that back into Magento too.

The result I have is that orders are automatically exported from Magento into UK Mails consignor to print the labels, they go off to the warehouse to be picked packed and shipped. Once UK Mail receive the parcels a file is created on their FTP server, we grab that file on a cron job, match the order numbers together and import the tracking number. Email goes off to the customer with their tracking number, we then update Magento with the latest scans eg In delivering warehouse, scanned onto van etc. We change the order status in Magento to with courier when we receive the tracking number we then update the order to complete once we get a POD confirmation on the UK Mail FTP server.

Magento Auto Approve Reviews

Managing reviews in Magento can be a pain if you’re getting a lot of reviews. The standard reviews section of Magento isn’t very quick and easy to use. I have made some changes so that reviews are automatically approved and you can easily view the reviews that have come through. I have also added some code so that every time a review is placed that is less than 3 stars it sends an email to notify you (please update ProductController.php with your email addresses).  I have made one slight alteration to the core Magento code so that the reviews dashboard has the star ratings and the full review description so that at a glance you can view all reviews and ratings.

Download here: AutoApproveReviews

Magento Custom Page

I have developed a very easy module to add a Magento Custom Page into the My Account section in Magento, I needed this for another project that I shall share once complete.

Whether its an information page or you build your own scripts into it there will probably be many uses for an additional page in the my account section for your customers to use.

Please download the zip below and upload to your server, the module doesn’t overwrite any core files.


Magento Remove Dashboard Links

Magento Remove Dashboard Links

Remove unwanted links from Account Dashboard Navigation without changing xml.

I have also used this method to split up the navigation into sections within the account dashboard navigation

Step 1: Go To ( YourTemplate/customer/account/navigation.phtml )

Step 2: Replace This Line: <?php $_count = count($_links); ?>


<? php $_count = count($_links); /* Add or Remove Account Left Navigation Links Here -*/
unset($_links[‘account’]); /* Account Info */
unset($_links[‘account_edit’]); /* Account Info */
unset($_links[‘tags’]); /* My Tags */
unset($_links[‘invitations’]); /* My Invitations */
unset($_links[‘reviews’]); /* Reviews */
unset($_links[‘wishlist’]); /* Wishlist */
unset($_links[‘newsletter’]); /* Newsletter */
unset($_links[‘orders’]); /* My Orders */
unset($_links[‘address_book’]); /* Address */
unset($_links[‘enterprise_customerbalance’]); /* Store Credit */
unset($_links[‘OAuth Customer Tokens’]); /* My Applications */
unset($_links[‘enterprise_reward’]); /* Reward Points */
unset($_links[‘giftregistry’]); /* Gift Registry */
unset($_links[‘downloadable_products’]); /* My Downloadable Products */
unset($_links[‘recurring_profiles’]); /* Recurring Profiles */
unset($_links[‘billing_agreements’]); /* Billing Agreements */
unset($_links[‘enterprise_giftcardaccount’]); /* Gift Card Link */

Magento and APC

I recently stumbled across an issue where by the frontend wasn’t displaying the latest code that had been uploaded to the live site.

There are a few options I discovered to clear the APC cache

1) Do a graceful restart on httpd

2) Add a module to Magento to clear the APC cache on prompt example extension

Magento Checkout Success page testing

You may find yourself wanting to edit your checkout success page, putting an order through every time you want to test your changes can get a bit repetitive. To save doing this every time the best thing to do is stop Magento clearing the session.

To do so go to:




Replace it with


This will comment out the code and allow you to refresh the success page as many times as required. To put make the changes once you are finished just remove the //

Magento unique coupon code for emails


I needed to be able to create a unique coupon code that would be programmatically created and that could be inserted into emails.

In this case I inserted the below code into a function that sends emails

Function: public function sendEmail($emailAddress, $store, $customer)


$randomString = substr(str_shuffle(“abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”), 0, 1) . substr(str_shuffle(“0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”), 0, 10);

$model = Mage::getModel(‘salesrule/rule’);
$model->setDescription(‘Discount coupon for Refer-a-Friend program.’);


As part of the array for this function I was then able to call upon the random string that was generated for the coupon code and insert it into the email

‘url’ => $this->prepareUrl($customer, $emailAddress, $store) ,
‘message’ => $this->getMessage(),
‘store’ => $store,
‘customer’ => $customer,
‘cccode’ => $randomString,


Then in my email template to call upon on the code {{ var cccode }} displays the unique coupon code for that customer


This method was used on Magento CE 1.9 and was inserted into a referral email for Aheadworks Points and Rewards module, get in touch for other uses of the code.


Magento Firecheckout and Aheadworks Loyalty and Rewards

To get Magento Firecheckout to work correctly with Aheadworks Loyalty and Rewards module you have to make the following changes to the code to ensure that it updates the totals.

1. Open /app/code/local/AW/Points/Block/Checkout/Onepage/Payment/Methods.php 2. Find the following lines (~44-46):
$this->setTemplate(‘aw_points/checkout/onepage/payment/’ . $magentoVersionTag . ‘/methods.phtml’);

return parent::_toHtml();
3. Add our code between them:
if (‘firecheckout’ === $this->getRequest()->getRouteName()) {
The result should be similar to this:
$this->setTemplate(‘aw_points/checkout/onepage/payment/’ . $magentoVersionTag . ‘/methods.phtml’);

if (‘firecheckout’ === $this->getRequest()->getRouteName()) {

return parent::_toHtml();
4. Refresh cache and try to use points at firecheckout page.