Category: Development

Automatically list images in a directory with PHP

Sometimes I want to lob some images into a directory to be viewed online for review. There is a way of doing this using glob which is a function in PHP that searches for path names matching patterns according to specified rules. <?php echo(‘<style type=”text/css”> img { margin:3px; padding: 7px; border: 1px solid #aaa; background: […]

Adding canonical URL’s to OpenCart

I wanted to address duplicate content on a project by adding canonical URL’s┬ábecause the product page (e.g.: mydomain.com/category/category.html) shares content on some category pages of the same name (e.g.: mydomain.com/category). OpenCart does not allow canonical URL’s by default and although you can buy modules to address this I decided to code my own solution. To […]