Still a problem...
I thought it was working fine, but have noticed that when clicking a category or collection in will pull all items of the products table instead of only the items that meet one of the two conditions within the WHERE statement. How would I go about fixing the OR id_product > 0 or how would I go about correctly assigning the where clause to a variable?