Saturday, November 24, 2012

Setting Newsletter to Yes by default in Opencart

In catalog/controller/account/register.php file

find :
$this->data['newsletter'] = '';

change it to :
$this->data['newsletter'] = 1;

Friday, November 2, 2012

Banner image not sorted by filename in Opencart

Fix :
catalog\model\design\banner.php

in line 4: add (." ORDER BY image ASC")

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image bi LEFT JOIN " . DB_PREFIX . "banner_image_description bid ON (bi.banner_image_id  = bid.banner_image_id) WHERE bi.banner_id = '" . (int)$banner_id . "' AND bid.language_id = '" . (int)$this->config->get('config_language_id') . "'" ." ORDER BY image ASC");