Products per Page

Posts: 12
Joined: 04/23/2008

Here are the two queries and what they return:

SELECT DISTINCT n.nid, COUNT(*) FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN uc_products AS p ON n.nid = p.nid WHERE tn.tid = 13 AND n.status = 1 AND n.type IN ('product','barebonesam2','barebonesam2plus') GROUP BY n.nid

nid | count
-----+-------
24 | 1
25 | 1
(2 rows)

SELECT DISTINCT(n.nid), n.sticky, n.title, n.created, p.model, p.ordering FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN uc_products AS p ON n.vid = p.vid WHERE tn.tid = 13 AND n.status = 1 AND n.type IN ('product','barebonesam2','barebonesam2plus') ORDER BY p.ordering, n.title, n.nid LIMIT 12 OFFSET 0

nid | sticky | title | created | model | ordering
-----+--------+--------------------------------+------------+---------------+----------
24 | 0 | Gigabyte AMD 690G AM2 MicroATX | 1209232825 | GA-MA69GM-S2H | 0
25 | 0 | Gigabyte AMD 690V AM2 MicroATX | 1209233129 | GA-MA69VM-S2 | 0
(2 rows)

The products per page in the catalog configuration is set to 12. However there are only 2 products in this particular category yet there is "1 2 next › last »" at the bottom of the page.

Products per Page By: bahadunn (16 replies) Sun, 04/27/2008 - 08:53