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

From JReviews Documentation
Jump to: navigation, search
 
Line 4: Line 4:
 
(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 and plan_id = 5))
 
(Listing.id IN (SELECT DISTINCT listing_id FROM #__jreviews_paid_orders WHERE order_active = 1 and plan_id = 5))
 
</source>
 
</source>
 
  
 
If you want to match multiple plans the statement can be written like this:
 
If you want to match multiple plans the statement can be written like this:
Line 11: Line 10:
 
(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.
 
  
 
[[Category:JReviews]]
 
[[Category:JReviews]]
 
[[Category:PaidListings Addon]]
 
[[Category:PaidListings Addon]]
 
[[Category:GeoMaps Addon]]
 
[[Category:GeoMaps Addon]]

Latest revision as of 20:27, 15 July 2016

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.