Magento 2: Add Library JavaScript File

Quick post to show you how to add in a third-party library via RequireJS. In this example I will be using the popular carousel library Slick Slider. Configuring RequireJS First add your third-party library file to your theme directory, app/design/frontend/<VendorName>/<ThemeName>/js/vendor/slick.min.js Next we need to configure our RequireJS. If you haven’t already got a configuration file

Continue Reading →

Magento 2: Calling and Initializing JavaScript

In the last post I showed you how to add a JavaScript file globally across your Magento 2 store. Today I’ll show you two more methods of loading, imperative and declarative. These methods allow you to only load the relevant JavaScript when required, as apposed to one global JavaScript file. Imperative notation The simplest method

Continue Reading →

Magento 2: Add Global JS File Through RequireJS

Adding in a JavaScript library to Magento 2 is very different to how you might be used to doing things from Magento 1. Magento 2 uses the RequireJS library for nearly every JavaScript feature it has. Today I’m going to show you the most basic example of how to utilise this library by adding a

Continue Reading →

Magento 2: Create New Theme

A quick post to show you how to create a new theme in Magento 2. Perfect when getting started with Magento 2. This post assumes you have an installation already setup and your looking to make your own customisations. Step 1: Folder structure Create a new directory for your theme: app/design/frontend/<VendorName>/<ThemeName> As a best practice

Continue Reading →

Git Hooks To Automate Deployment

Deploying your git repository into production can be made a lot easier by using Git hooks. In this article I’ll be showing you how to use the post-receive hook to deploy your repository into your production environment. It will only deploy your master branch, which should be your stable code. If you attempt to push

Continue Reading →

Installing Magento 2

The new and improved Magento 2 platform has been released but installing it can be tricky the first time round. The installation process has changed since the last versions and it takes a bit of time to get it up and running. I’ll be showing you how to install it locally while detailing any errors

Continue Reading →

Mac OS X 10.11 El Capitan Localhost Setup

There are multiple methods and tools for developing web applications locally, I’ve always been a big fan of MAMP Pro due to it’s simplicity and it’s UI, it’s pleasant to use, very easy to setup and you’ll get running in no time. It does however have it’s downfalls and with OS X 10.11 now coming

Continue Reading →

Multiple Git Accounts and SSH Keys

If you have multiple accounts with a Git solution such as Bitbucket or GitHub and are using SSH keys to connect to your repository you will find they don’t allow you to use the same SSH key per account and you have to generate a different key per account with a different name. You can

Continue Reading →

Magerun, Your Magento CLI Tool

The swiss army knife for Magento developers, providing a huge set of well tested command line commands which save hours of work time. If your developing Magento sites this is a must have addition for your toolbox. Logging into the Magento admin area to perform some simple tasks is very time consuming, if your already

Continue Reading →

Finding unused Scss variables

With any Sass project variables play an important part but they can get out of control and managing them can be difficult at times. During development we are creating new ones, removing them or in some cases not finding a need for them. It’s good practice to ensure your codebase is clean and maintainable, one

Continue Reading →