Post by asg333 » Sat Jun 26, 2010 4:08 am

Hi,

Is there a way, in the admin section of this module, to only list the items that have their status set as "enabled"?

Also, how can I increase the size of the image displayed in the featured box?

Thank you!

New member

Posts

Joined
Mon Jan 11, 2010 12:33 am

Post by JAY6390 » Sat Jun 26, 2010 10:28 pm

To set it to only show the enabled featured products, change this line

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_featured f LEFT JOIN " . DB_PREFIX . "product p ON (f.product_id=p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (f.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' LIMIT " . (int)$limit); 
to

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_featured f LEFT JOIN " . DB_PREFIX . "product p ON (f.product_id=p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (f.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND p.status = 1 LIMIT " . (int)$limit); 
In /catalog/model/catalog/product.php
it should be around line 355 under the line

Code: Select all

public function getFeaturedProducts($limit) { 

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by asg333 » Mon Jun 28, 2010 11:02 am

Thank you! Works great!

New member

Posts

Joined
Mon Jan 11, 2010 12:33 am

Post by JAY6390 » Mon Jun 28, 2010 6:10 pm

No problem :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Mon Jun 28, 2010 10:07 pm

This is actually a bug as it should be only enabled by default. I'll fix in the next version

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 17 guests