🖥️ CLI Documentation

Engine V2 - reprice_v2.php - Cross-platform (Windows/Linux/macOS)

rocket_launch Quick Start Guide

Engine V2: PrepareData (cached 24h) + Reprice (DSL always fresh)

1

Prepare Data

Loads product data, competition, linked products. Cached 24h.

2

Reprice (DSL)

Evaluates rules on cached data. Always uses fresh rules.

3

Save Price

Optionally saves the calculated price to DB.

🚀 Most Common Commands

🔹 Single Product Test

php ./commands/reprice/reprice_v2.php \ --domain=parfumsetmoi.fr \ --id=23155 \ --strategy=19 \ --verbose

🔹 Batch from File

php ./commands/reprice/reprice_v2.php \ --domain=parfumsetmoi.fr \ --idlist=product_ids.txt \ --strategy=19

🔹 Force Fresh Data

php ./commands/reprice/reprice_v2.php \ --domain=parfumsetmoi.fr \ --id=23155 \ --force-data \ --debug

🔹 With Save to DB

php ./commands/reprice/reprice_v2.php \ --domain=parfumsetmoi.fr \ --id=23155 \ --save
💡 Cross-platform: Use php ./commands/... format. Works on Windows, Linux, macOS.

filter_1 Single Product Repricing

Reprice a single product by ID. Ideal for testing and debugging.

📋 Basic Usage

# Reprice with specific strategy php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --id=23155 --strategy=19 -v # With auto-detected strategy php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --id=23155 -v

🔍 Debug Mode

php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --id=23155 --debug

🔄 Force Data Refresh

php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --id=23155 --force-data --debug

🌍 Available Domains

parfumsetmoi.fr # France profi-parfemy.cz # Czech Republic parfum-zentrum.de # Germany casadelprofumo.it # Italy parfumzentrum.at # Austria perfumesoriginal.es # Spain

format_list_numbered Batch Processing

Reprice multiple products from a file. One product ID per line.

📄 Create ID List File

# product_ids.txt - one ID per line 23155 23156 23157 23158 23159

🚀 Run Batch Reprice

# Process all products from file php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --idlist=product_ids.txt --strategy=19 # With verbose output php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --idlist=product_ids.txt -v # Save prices to database php ./commands/reprice/reprice_v2.php --domain=parfumsetmoi.fr --idlist=product_ids.txt --save

📊 Output Example

╔══════════════════════════════════════════════════════════╗ ║ 🏷️ ENGINE V2 - REPRICE ║ ╠══════════════════════════════════════════════════════════╣ ║ Domain: parfumsetmoi.fr ║ ║ Strategy: 19 ║ ║ Products: 5 ║ ╚══════════════════════════════════════════════════════════╝ Processing [1/5] Product ID: 23155... ✅ 23155: 45.90 → 43.50 Processing [2/5] Product ID: 23156... ✅ 23156: 67.00 → 65.99 ... ╔══════════════════════════════════════════════════════════╗ ║ 📊 BATCH SUMMARY ║ ╠══════════════════════════════════════════════════════════╣ ║ Total processed: 5 ║ ║ Success: 4 ║ ║ Failed: 1 ║ ╚══════════════════════════════════════════════════════════╝
💡 Tip: For large batches, split into smaller files (100-500 products) to track progress better.

auto_fix_high Command Generator

Generate CLI commands for reprice_v2.php

menu_book reprice_v2.php - Full Reference

📋 Syntax

php ./commands/reprice/reprice_v2.php --domain=<domain> [options]

📊 Parameters Reference

ParameterTypeDescription
--domain=RequiredDomain to process (e.g., parfumsetmoi.fr)
--id=Optional*Single product ID to reprice
--idlist=Optional*Path to file with product IDs (1 ID per line)
--strategy=OptionalStrategy ID. Auto-detects if not provided
--verbose / -vOptionalEnable verbose output
--debugOptionalEnable detailed debug output
--force-dataOptionalForce refresh cached data (bypass 24h cache)
--saveOptionalSave calculated prices to database
--help / -hOptionalShow help message

* At least one of --id or --idlist is required.

api Related API Endpoints

EndpointPurpose
/api/go_price_v2.phpEngine V2 API - used by GUI (data cached 24h, DSL always fresh)
/api/dsl-variables-usage.phpGet list of DSL variables used in rules/guardrails

cloud_upload Domain Reprice with RabbitMQ

Reprice entire domain or single product and publish to RabbitMQ queues based on strategy routes.

📋 Syntax

php ./commands/reprice/reprice_v2_domain.php --domain=<domain> [options]

📊 Parameters Reference

ParameterTypeDescription
--domain=RequiredDomain to process (e.g., parfumsetmoi.fr)
--strategy=OptionalStrategy ID (routes determined by strategy_pricing_route_map)
--id=OptionalSingle product ID (if omitted, processes entire domain)
--saveOptionalSave to RabbitMQ + DB (without this, only preview)
--limit=OptionalLimit number of products to process
--verbose / -vOptionalEnable verbose output
💡 Strategy Routes: Routes are determined by strategy settings via strategy_pricing_route_map table. Strategy 19 → heliostest + xml routes.

code Usage Examples

🔹 Single Product to RabbitMQ

# Reprice single product and send to RabbitMQ (strategy routes) php ./commands/reprice/reprice_v2_domain.php \ --domain=parfumsetmoi.fr \ --strategy=19 \ --id=691936 \ --save \ -v

🔹 Entire Domain (Preview)

# Preview all products (no --save = dry run) php ./commands/reprice/reprice_v2_domain.php \ --domain=parfumsetmoi.fr \ --strategy=19 \ --limit=100 \ -v

🔹 Entire Domain (Full Run)

# Process all products and publish to RabbitMQ php ./commands/reprice/reprice_v2_domain.php \ --domain=parfumsetmoi.fr \ --strategy=19 \ --save

🔹 Italy Domain

php ./commands/reprice/reprice_v2_domain.php \ --domain=casadelprofumo.it \ --strategy=19 \ --save

settings_ethernet RabbitMQ Integration

The script publishes to environment-aware queues based on strategy routes:

# Strategy 19 has these routes configured: heliostest → Queue: pricing_testing_heliostest xml → Queue: pricing_testing_xml # Queue name format: pricing_{environment}_{route_name}

📊 Example Output

╔══════════════════════════════════════════════════════════╗ ║ 🏷️ ENGINE V2 - DOMAIN REPRICE ║ ╠══════════════════════════════════════════════════════════╣ ║ Domain: parfumsetmoi.fr ║ ║ Strategy: 19 ║ ║ Single Product ID: 691936 ║ ║ Save Mode: ENABLED ║ ╚══════════════════════════════════════════════════════════╝ 📡 Found 2 route(s) for strategy 19: heliostest, xml Processing [1/1] Product ID: 691936... → Original: 63.10 EUR | New: 62.54 EUR | Change: -0.89% 📤 Sent to queue: pricing_testing_heliostest 📤 Sent to queue: pricing_testing_xml ✅ 1 product processed, sent to RabbitMQ