Saturday, 12 December 2015

Rejoin hjsplit files on Mac OSX, linux and bsd

open the terminal and just run the cat command

cat yourfile.extension.001 yourfile.extension.02 yourfile.extension.00X > yourfile.extension

Friday, 4 December 2015

[FIX] OPENCART - Call to a member function getFirstName() on a non-object

The error
Call to a member function getFirstName() on a non-object

could appear if there's something wrong in your admin configuration file.


Follows a sample configuration file for the admin area

<?php
// HTTP
define('HTTP_SERVER', 'http://www.example.it/admin/');
define('HTTP_CATALOG', 'http://www.example.it/');

// HTTPS
define('HTTPS_SERVER', 'http://www.example.it/admin/');
define('HTTPS_CATALOG', 'http://www.example.it/');

// DIR
define('DIR_APPLICATION', '/var/www/vhosts/example.it/httpdocs/admin/');
define('DIR_SYSTEM', '/var/www/vhosts/example.it/httpdocs/system/');
define('DIR_LANGUAGE', '/var/www/vhosts/example.it/httpdocs/admin/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/example.it/httpdocs/admin/view/template/');
define('DIR_CONFIG', '/var/www/vhosts/example.it/httpdocs/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/example.it/httpdocs/image/');
define('DIR_CACHE', '/var/www/vhosts/example.it/httpdocs/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/example.it/httpdocs/system/download/');
define('DIR_UPLOAD', '/var/www/vhosts/example.it/httpdocs/system/upload/');
define('DIR_LOGS', '/var/www/vhosts/example.it/httpdocs/system/logs/');
define('DIR_MODIFICATION', '/var/www/vhosts/example.it/httpdocs/system/modification/');
define('DIR_CATALOG', '/var/www/vhosts/example.it/httpdocs/catalog/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'usert');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'db_example');
define('DB_PREFIX', 'oc_');