<?php
class ModelExtensionTestimonial extends Model {
	public function getTestimonials() {
		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "testimonial i LEFT JOIN " . DB_PREFIX . "testimonial_description id ON (i.testimonial_id = id.testimonial_id) LEFT JOIN " . DB_PREFIX . "testimonial_to_store t2s ON (i.testimonial_id = t2s.testimonial_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND t2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' AND i.publish_date <= NOW() ORDER BY i.sort_order, LCASE(id.title) ASC ");

		return $query->rows;
	}
}