Emag Checker
Description
eMag Checker extends the Enso eMag integration with competitive-price checking and auto-pricing workflows.
The package tracks long-running check operations, augments eMag offers with checker-specific pricing metadata, can automatically adjust client product discounts to defend the buy button, and exposes endpoints for enabling or disabling auto-pricing per offer.
It is designed to run on top of laravel-enso/emag, not as a standalone integration, and is intended for private Enso deployments that operate on eMag.
Installation
This is a proprietary package distributed through the private Enso registry.
Run the package migrations:
php artisan migrate
Default configuration:
return [
'enabled' => (bool) env('EMAG_CHECKER_ENABLED', true),
'overdue' => (int) env('EMAG_CHECK_OVERDUE', 30),
];
When enabled in production, the package schedules enso:emag:checker:check-overdue every 30 minutes.
Features
- Full-page competitive-price checks queued as IO operations.
- Offer-level auto-pricing flags, competitor state tracking, and historical check snapshots.
- Discount dropping and discount recalculation services for active eMag offers.
- Auto-pricing activation and deactivation endpoints under the existing eMag offers API.
- Overdue-check notifications for admin users plus recovery tooling for stuck check runs.
Usage
Operational commands:
php artisan enso:emag:check --pages=5 --skip=0 --readonly
php artisan enso:emag:drop-discounts --strong-competitors
php artisan enso:emag:checker:check-overdue
php artisan enso:emag:finalize-in-progress
Core offer helpers:
activateAutoPricing()deactivateAutoPricing()tryGoingBelow(Remote $remote)checks()
The checker processes approved active marketplace offers page by page, snapshots the remote price state for each checked offer, and can either reprice local discounts or drop them entirely depending on the detected scenario.
When a check remains stuck past the configured overdue threshold, the package notifies active admin users and finalizes the pending operation automatically.
API
HTTP routes
POST api/integrations/emag/offers/{offer}/activateAutoPricingPOST api/integrations/emag/offers/{offer}/deactivateAutoPricing
Route names:
integrations.emag.offers.activateAutoPricingintegrations.emag.offers.deactivateAutoPricing
Artisan commands
enso:emag:checkenso:emag:drop-discountsenso:emag:checker:check-overdueenso:emag:finalize-in-progress
Configuration
enso.emag-checker.enabledenso.emag-checker.overdue
Depends On
Required Enso packages:
Runtime companion packages:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!