Post by ck.kong » Wed Aug 12, 2009 11:25 am

Go to the folder catalog/model/catalog and edit the file product.php and add-in the red color checking. (Backup before modify the file)

At line 37 ~ line 42
public function getTotalProductsByCategoryId($category_id = 0) {
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "product_to_category p2c LEFT JOIN " . DB_PREFIX . "product p ON (p2c.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2c.category_id = '" . (int)$category_id . "' AND ss.language_id = '" . (int)$this->language->getId() . "'");

return $query->row['total'];
}

Or you can cut and paste the entire function with this code too.

Code: Select all

public function getTotalProductsByCategoryId($category_id = 0) {
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "product_to_category p2c LEFT JOIN " . DB_PREFIX . "product p ON (p2c.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2c.category_id = '" . (int)$category_id . "' AND ss.language_id = '" . (int)$this->language->getId() . "'");

return $query->row['total'];
}

Newbie

Posts

Joined
Wed Aug 12, 2009 10:12 am

Post by jacobIdesign » Fri Aug 21, 2009 1:34 pm

This fixed my issue!

http://www.jacobidesign.com


Newbie

Posts

Joined
Fri Aug 14, 2009 1:44 pm


Post by ellina » Wed Aug 26, 2009 10:06 pm

Worked like a charm, no pagination issues anymore.
Many thanks :)

http://www.neatcss.com


User avatar
Newbie

Posts

Joined
Sat Aug 08, 2009 1:14 am


Post by ckpepper02 » Mon Feb 01, 2010 11:52 pm

Thanks for this! It fixed my issue too.

User avatar
New member

Posts

Joined
Wed Jul 22, 2009 8:35 pm
Who is online

Users browsing this forum: No registered users and 132 guests