>> Shopify Auto Fill Checkout URL

You can build links to your Shopify’s checkout with a prefilled cart (1 item of a quantity you decide) via following this pattern: https://yourshopifyurl.com/cart/variantId:Qty Then you need to add the get queary to pre-fill in billing details like: checkout[email]=email@domian.com &checkout[billing_address][first_name]=John &checkout[billing_address][last_name]=Doe &checkout[billing_address][address1]=123 Fake Street &checkout[billing_address][city]=Sydney &checkout[billing_address][country]=Australia &checkout[billing_address][province]=New South Wales &checkout[billing_address][zip]=2000 I assume, but have not had time to verify, you can also add shipping address details in the same way.

Posted At: October 24, 2016 Comments: 0 Categories: Shopify Tags:

>> Doctrine Error with MySQL Keywords

I recently came across what I would consider a bug, for Doctrine2. Basically, I had created an entity in Symfony2 that I needed to have a boolean that told me if this entry could be shown publicly or not. Without thinking I went ahead and put it down as $show. Since I had set the column name in the annotations, it was automatically taken as the actual field name in the database, when I used doctrine to update the schema. It worked fine, and upon checking the database it all looked correct. I moved on to the code in charge

Posted At: November 27, 2013 Comments: 0 Categories: Doctrine2, PHP, Symfony2 Tags: , , ,

>> ‘Symfony\Component\Form\Form’ was not found

An issue I’ve come across a couple of times recently, by making a small mistake, is persisting a form input to Doctrine using Symfony2. The issue I was having, was that when calling the persist method of the Entity Manager, I was passing it the form instead of the entity. I came across it due to the controller I was working on being quite odd, but it’s very easy to just type the wrong name as lots of people use very similar names for their form and the entity it relates to, for obvious reasons. The key here is to

Posted At: November 27, 2013 Comments: 0 Categories: Doctrine2, PHP, Symfony2 Tags: , , , ,

>> Local SMTP

Have you ever been working on a project, on your local environment, where you needed to test emailing? It’s a tedious task to setup a local SMTP to work with, and then you always have the issue of accidentally sending someone an email from the website, during routine development or testing. For a long time, I just dealt with SMTP, by not testing it until it was on a server, which works, but can be time consuming to test, especially if you’ve messed it up. Thankfully, about 2 months ago, I found Papercut. It’s a program you can run on

Posted At: April 27, 2013 Comments: 0 Categories: SMTP Tags:

>> WordPress Shortcodes

Have you ever found when creating a WordPress theme or plugin, you wanted to be able to easily have a user able to include something in a page, or post, with ease? It’s something that’s likely come up many times if you work with clients, who might not be the best when it comes to computers or the internet. Thankfully, WordPress has a good way to make this task that little bit easier, that can allow some of these people to be able to use them, and also save more technical minded people a few minutes of work. They’re called

Posted At: April 25, 2013 Comments: 0 Categories: PHP, WordPress Tags: , ,

>> Drupal Module Building Tutorial

In this tutorial I will show you how to build a very simple Drupal Module, that will allow you to place copyright text in a block as a Drupal module. There are a number of ways to achieve this without resorting to creating your own module, but the point of this exercise is to show you some basic principles of creating modules for Drupal 7. For this tutorial, I’m going to assume you have a good understanding of PHP5, and a basic understanding of how the Drupal CMS works, especially Blocks and Admin configuration. Before we begin, you should download

Posted At: February 4, 2013 Comments: 1 Categories: Drupal, PHP Tags: ,

>> CodeIgniter User Library

Now that I’ve finally got around to setting myself up with a personal blog, I’d like to start by sharing some code. This is more because I’d like to see what people think. It’s actually one of the first pieces of code I wrote for Codeigniter. Basically I wanted to create a simplistic register/login system for a site, as it’s something I’m likely to want on most sites I create. My requirements were simple, just the ability to register, login and logout with minimal user data captured. Later on (as you’ll see in a comment) I planned on adding more

Posted At: January 22, 2013 Comments: 0 Categories: Codeigniter, PHP Tags: ,