tutorial

Drupal Commerce Bulk Product Update

Drupal Commerce has the best implementation for handling virtual products sales as if in a real life store, in my opinion. Each product has a product display (or container) which houses each individual product, a variation per se, ( ex: shirt Z size small, shirt Z size medium) which provides better stock management and a streamlined business process if you do have a physical store and virtual store. There's just one major caveat: each product variation has to your product data attached, not the product display. So a t-shirt with 6 sizes is actually 6 products.

Ubercart Tax Per Product

Recently I had to configure a client's Ubercart to tax per product to prevent gift certificates from being taxed at checkout. Ideally I wanted to add a "NOT" rule to my sales tax rate item within Ubercart; but, Drupal only supports "AND" and "OR" operators. Read my run down on my pitfalls and eventual success in setting up Ubercart tax per product. I tried a few Google searches and came up with year old threads that did not provide much of a solution, or the solution was for previous versions of Drupal and Ubercart.

Custom Form Fields in Joomla

When I was developing my Joomla! components to make my GRealty suite I needed a few custom fields that were not native to Joomla The process is simple and only requires one new folder and one new file in your component. In your components admin/models/  folder create a new folder called 'fields'. Create a new PHP file, name it however you want your field to be referenced within Joomla.

Sanitize Text for SQL

Cross Site Scripting (XSS) and SQL Injections are some of the biggest security threats to a PHP application.  Every developer has different ways of preventing SQL Injections or malicious JavaScript from being inserted into the database. Here are some easy solutions to help safeguard your PHP applications.

mysql_real_escape_string()

mysql_real_escape_string() should always be used on data being placed into your SQL database.

PHP Server Variables

I know when I first started out learning PHP it was difficult finding good examples or live demos of simple PHP in use. Often I'd have a large number of files used to demonstrate built in PHP functions. So, to help any budding PHP developers out there I compiled a list of the PHP Server variables along with what data they provide.  $_SERVER variables can be used in multiple ways from getting information about your visitors to script security.