Difference between revisions of "How to filter Listings and Geomaps modules to entries with specific plans"

From JReviews Documentation
Jump to: navigation, search
Line 11: Line 11:
 
(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 and plan_id IN (4,5,6)))
 
(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 and plan_id IN (4,5,6)))
 
</source>
 
</source>
 +
  
 
Make sure you change the plan_id(s) to match the ids of your paid plans.
 
Make sure you change the plan_id(s) to match the ids of your paid plans.

Revision as of 20:07, 20 November 2013

It is possible to filter the output of the modules and even the JReviews Custom List menu by adding a CUSTOM WHERE statement that looks like this:

(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 AND plan_id = 5))


If you want to match multiple plans the statement can be written like this:

(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 AND plan_id IN (4,5,6)))


Make sure you change the plan_id(s) to match the ids of your paid plans.