SEO URLs for OpenCart Using a “web.config” File on Windows IIS Server

I always suggest Linux hosting for any OpenCart installations. The main OC developers either don’t know much about Windows IIS or neglect to include the necessary SEO URL configuration file for it to work.

This omission results in “not found” 404 (dead link) errors when you visit a page with an SEO URL assigned after enabling SEO URLs in your OpenCart store settings.
Continue reading SEO URLs for OpenCart Using a “web.config” File on Windows IIS Server

PHP Function to Sum or Concatenate Associative Array Values

Here is a quick function I created to merge multiple arrays and sum or concatenate the values thereof. If the values are numeric they will be added together (sum). Otherwise the values will be appended to each other (concatenation).

function arrayMergedSumConcat() {
	$out = array();

	$num_args = func_num_args();
	
	$arg_list = func_get_args();
	
	for ($i = 0; $i < $num_args; $i++) { $in = $arg_list[$i]; foreach ($in as $key => $value) {
			if (isset($out[$key])) {
				if (is_numeric($in[$key]) && is_numeric($out[$key])) {
					$out[$key] += $in[$key];
				} else {
					$out[$key] .= $in[$key];
				}
			} else {
				$out[$key] = $in[$key];
			}
		}
	}
	
	return $out;
}

Add Hints to Custom Fields in Open Cart 2.x

We have published a new extension that allows you to add a “hint” for your custom field at Account and Address locations.

More details: https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=32138

The name of a custom field is often not enough to inform a customer what the entry is for or the required format. This extension gives you an extra field to better describe the purpose and validation requirements for all of your custom fields. The field hint is displayed in all relevant guest and customer forms. See the images included on this page for examples.

CCleaner… loved by many, avoided by me (with good reason)

I have always been of the mindset, the more you add to a system to automate mundane tasks, the more you open yourself to exploits. I have had to deal with many workstations, servers, and personal computers that were previously maintained by other (less experienced) administrators that swear by the use of CCleaner, Defraggler, and Speccy (not linking intentionally, use Google if you want links to their software). I have always immediately removed them as one of my first clean-up tasks. Continue reading CCleaner… loved by many, avoided by me (with good reason)

Toggle Password Display in HTML5 with jQuery

Do you have  a password field that the user wants to be able to view at the click of a button? Here is the solution I came up with to handle that need…

The field…

<div class="input-group">
  <input type="password" name="password" value="P@$$w0rD" placeholder="Password" id="input-password" class="form-control" required>
  <span id="view-password" class="input-group-addon"><i class="fa fa-eye" aria-hidden="true"></i></span>
</div>

The javascript… Continue reading Toggle Password Display in HTML5 with jQuery

How to Move a Domain Between BlueHost Accounts

Save yourself the trouble and don’t bother asking BlueHost support when you run into a problem trying to assign a domain from one BlueHost account to another. They misinformed us about more than a few aspects and the notices displayed on the page when the assignment encounters a problem is not very intuitive.

First things first: If you are using BlueHost for email and have your email program configured for IMAP, you have a bit of work ahead of you.

Continue reading How to Move a Domain Between BlueHost Accounts

How to Uninstall a Program on Windows 7 (with pictures)

Most applications for Windows 7 use an installation program such as Windows Installer to install the application in the system.

Windows Installer ensures that installed programs can be easily removed from the system. Under no circumstances should you simply delete the program folder of the application. Doing so would leave numerous files and registry entries in the system, which could compromise operating system stability. Continue reading How to Uninstall a Program on Windows 7 (with pictures)

Stop Annoying favicon.ico 404 errors

If you’re like me, you don’t like cluttering your main folder with unnecessary files. This is why I hate that some browsers are still looking for ‘favicon.ico’ in the main folder even when you indicate in <head> that’s not where the agent should be looking…

Here is a way to eliminate those PITA 404’s from your error logs… Continue reading Stop Annoying favicon.ico 404 errors

Freelance LAMP (Linux, Apache, MySQL, PHP) Developer for Hire