Featured Products
Source: pharmanet-web/src/pages/Dashboard/
Pages
| Page |
Route |
Description |
SellerFeaturedProducts |
/featured-products |
Current boosted products |
SellerProductSelection |
/products/feature |
Select products to boost |
FeatureProductPayment |
/products/feature/payment |
Chapa checkout |
FeaturedProductCallback |
/products/feature/payment-callback |
Payment verification |
Flow
sequenceDiagram
participant S as Seller
participant FP as Feature Flow
participant CP as Chapa
participant DB as Supabase
S->>FP: Browse products, select
FP->>S: Show duration & pricing
S->>FP: Choose 30/90/180/365 days
FP->>DB: Create pending payment record
FP->>CP: Initialize Chapa payment
CP-->>S: Hosted checkout
S->>CP: Complete payment
CP-->>FP: Callback URL
FP->>DB: Verify + activate featured status
DB-->>FP: Set start/end dates
FP->>S: Confirmation screen
Pricing
| Duration |
Price (ETB) |
| 30 days |
100 |
| 90 days |
300 |
| 180 days |
600 |
| 365 days |
1,200 |
Services
Source: pharmanet-web/src/services/featuredProducts.js
| Function |
Description |
getSellerFeaturedProducts(sellerId) |
Current boosts |
createFeaturedProduct(payload) |
Create pending record |
activateFeaturedProduct(id, start, end) |
Activate after payment |
deleteFeaturedProduct(id) |
Remove boost |
extendFeaturedProduct(id, days) |
Extend duration |
Redux Slice
Source: pharmanet-web/src/store/featureProductSlice.js
| Action |
Description |
fetchSellerFeaturedProducts(sellerId) |
List seller's boosts |
createFeaturedProduct(payload) |
Create with Chapa init |
removeFeaturedProduct(id) |
Remove boost |
extendFeaturedProduct(id, days) |
Extend |