Task #62
openAdd Amount (Price) Filter for Ads by Category
0%
Description
To add an amount-based filtering option so users can filter ads within a selected category by price range. The filter should help users quickly find ads that match their budget.
Tables Used (Reference Existing)
***ads
Field Description
id (PK) Ad ID
user_id (FK) Ad owner
category_id (FK) Selected category
title Ad title
description Ad details
price Ad amount/price
price_type Fixed / Negotiable / Free
status Draft / Pending / Approved / Rejected / Expired
is_active Active / Inactive
created_at Timestamp
***categories
Field Description
id (PK) Category ID
name Category name
is_active Active / Inactive
***Validations
***Filter Inputs
*Min Amount – Numeric, ≥ 0
*Max Amount – Numeric, ≥ Min Amount
***Price Type Handling:
*If price_type = Free → exclude from amount filter OR show in “Free” section
*If price_type = Negotiable → include in results if within range (based on stored price, if any)
***System Rules
*Filter should apply only after a category is selected
Show only:
*is_active = true
*status = Approved
*Clear filter should reset amount range and show all ads in the selected category
*Filter should update results without full page reload (AJAX / API preferred)