Posts

Add Customer and Customer Address Attributes in Magento 2

Sometimes the default attributes provided by Magento might not be enough. Here we explain how to add customer and customer address attributes in Magento 2.
If you have followed the post on how to add category attributes, you will know that Magento 2 uses the InstallData class.
This is no different to adding customer-related attributes, ...

Add Category Attributes in Magento 2

Occasionally Magento developers will need to extra attributes to the system. Here we explain how to add category attributes in Magento 2.
If you are familiar with adding attributes to Magento 1, you’ll know that they can be added via install scripts and using a specific resource class. Category attributes are added via the Mage_Catalog_Model_Resource_Setup ...

SASS Operators

SASS introduces mathematics to help you write your CSS. Here we take a look at some of the different types of SASS operators and how they can be used in your project.
Assignment Operator
Similar to assigning CSS values to properties, we use the : operator to define variables within SASS.
$defaultFontSize: 12px;
Arithmetic Operators

Basic Unix Commands

Many operating systems such as a Linux are considered ‘Unix-like’ and therefore it’s more than likely that you’ll have to know some basic UNIX commands in order to be proficient at using the command line.
Assuming you are a complete beginner, let’s start with a few commands to get you underway.
Basic Unix Commands – ...

SASS Mixins

SASS mixins are portions of reusable CSS that can be used in your project without having to be repeated like when having to write normal CSS.
A common example of a mixin in use is the border-radius property. Usually in older versions of browsers such as Firefox and Chrome, you had to specify additional -moz- ...

Top 10 Best Theme Practices for Magento 1

Themes in Magento are used to customise the look and feel of your store. Here is a list of the top 10 best theme practices for Magento 1.
1. Theme fallback
Developers may choose a couple of locations to add a theme: within one of the default Magento package directories, or by adding their own ...

Admin Changes in Magento 2

The admin area in Magento has always been extensive and the system configuration remains highly customisable. In recent versions of Magento, some of the information in the admin area has moved around! Here we show some of the admin changes in Magento 2.
One of the most notable changes when logging into the Magento 2 ...

Undoing Changes in Git

Version control serves as a great way to keep history of the project’s changes, however sometimes we may feel the need to revert back to an original version. Here is how to go about undoing changes in Git.
Git checkout
Although git checkout is mainly used for checking out branches, you can also use the ...

Preventing Email Injection in PHP

Security measures should be taken that will assist in preventing email injection in PHP. Notably of spam-related content into the email.
Emails in PHP often use the standard mail() function. This means that your code might look something like this:
mail("support@somewebsite.com", "Contact Form Reply", $message, "From: $email" );
The code above sends the message to ...

Zend PHP 5 – Functions – Syntax

Functions are covered within the Zend PHP study guide. Functions are packages of code that serve as instructions to execute an action.
Any valid PHP code can reside in a function.
You can define a function like the example written below.
<?php
function foo($arg_1, $arg_2, /* ..., */ $arg_n)
{
...