142 lines
3.2 KiB
Markdown
142 lines
3.2 KiB
Markdown
# Quick Reference Card
|
|
|
|
## Repository Access
|
|
```bash
|
|
git clone https://devops.cloudhost.es/InformatiQ/IQ-Dynamic-Google-Pricing.git
|
|
```
|
|
|
|
**Credentials**:
|
|
- Username: `Malin`
|
|
- Password: `MuieSteaua09!@`
|
|
|
|
---
|
|
|
|
## Installation (3 Steps)
|
|
|
|
1. **Clone & Upload**:
|
|
```bash
|
|
git clone https://devops.cloudhost.es/InformatiQ/IQ-Dynamic-Google-Pricing.git
|
|
cp -r IQ-Dynamic-Google-Pricing /path/to/wordpress/wp-content/plugins/informatiq-smart-google-pricing
|
|
```
|
|
|
|
2. **Activate**: WordPress Admin > Plugins > Activate "informatiq-smart-google-pricing"
|
|
|
|
3. **Configure**: WooCommerce > Smart Pricing
|
|
- Enter Google Merchant ID
|
|
- Paste Service Account JSON
|
|
- Set minimum margin %
|
|
- Enable auto-updates
|
|
- Test connection
|
|
- Run manual sync
|
|
|
|
---
|
|
|
|
## Key File Locations
|
|
|
|
**Main Plugin**: `informatiq-smart-google-pricing.php`
|
|
**Admin Interface**: `admin/class-informatiq-sp-admin.php`
|
|
**Google API**: `includes/class-informatiq-sp-google-api.php`
|
|
**Price Logic**: `includes/class-informatiq-sp-price-updater.php`
|
|
**Scheduler**: `includes/class-informatiq-sp-scheduler.php`
|
|
**Logger**: `includes/class-informatiq-sp-logger.php`
|
|
|
|
---
|
|
|
|
## Database
|
|
|
|
**Table**: `wp_informatiq_sp_logs`
|
|
**Options**:
|
|
- `informatiq_sp_merchant_id`
|
|
- `informatiq_sp_service_account`
|
|
- `informatiq_sp_minimum_margin`
|
|
- `informatiq_sp_auto_update_enabled`
|
|
- `informatiq_sp_update_frequency`
|
|
|
|
**Cron Event**: `informatiq_sp_daily_price_update`
|
|
|
|
---
|
|
|
|
## Admin Access
|
|
|
|
**Settings Page**: WooCommerce > Smart Pricing
|
|
**Logs**: WooCommerce > Status > Logs (select informatiq-smart-pricing log)
|
|
**Cron Check**: Install "WP Crontrol" plugin to view scheduled events
|
|
|
|
---
|
|
|
|
## Pricing Formula
|
|
|
|
```
|
|
1. Get competitor price from Google Merchant Center
|
|
2. Generate random offset: $0.05 - $0.20
|
|
3. Calculate target: Competitor Price - Offset
|
|
4. Handle taxes (inclusive or exclusive)
|
|
5. Check minimum: Cost + Margin %
|
|
6. Update sale price
|
|
7. Log change
|
|
```
|
|
|
|
---
|
|
|
|
## Product Requirements
|
|
|
|
- ✅ Stock status: In stock
|
|
- ✅ SKU: Must be set and match Google Merchant Center
|
|
- ✅ Exist in Google Merchant Center
|
|
- ⭐ Optional: `_wc_cog_cost` meta for accurate margins
|
|
|
|
---
|
|
|
|
## Troubleshooting Quick Fixes
|
|
|
|
**"Connection failed"**
|
|
→ Check Merchant ID, Service Account JSON, API enabled
|
|
|
|
**"No competitive data"**
|
|
→ Product not in Merchant Center or SKU mismatch
|
|
|
|
**"Prices not updating"**
|
|
→ Check WP Cron is running, auto-updates enabled
|
|
|
|
**"Library missing"**
|
|
→ Clone from Git (vendor included)
|
|
|
|
---
|
|
|
|
## Key Features
|
|
|
|
✅ Automated daily price updates
|
|
✅ Tax-aware calculations
|
|
✅ Minimum margin protection
|
|
✅ Google Merchant Center integration
|
|
✅ Manual sync button
|
|
✅ Comprehensive logging
|
|
✅ Clean admin interface
|
|
✅ In-stock only processing
|
|
|
|
---
|
|
|
|
## Support
|
|
|
|
**Author**: Mălin Cenușă
|
|
**Email**: contact@malin.ro
|
|
**Website**: https://informatiq.services
|
|
|
|
---
|
|
|
|
## Documentation Files
|
|
|
|
- `README.md` - Full documentation
|
|
- `INSTALLATION.md` - Detailed setup guide
|
|
- `QUICKSTART.md` - 10-minute guide
|
|
- `PROJECT-SUMMARY.md` - Complete project overview
|
|
- `FILE-MANIFEST.md` - File reference
|
|
- `QUICK-REFERENCE.md` - This file
|
|
|
|
---
|
|
|
|
**Version**: 1.0.0
|
|
**Status**: ✅ Production Ready
|
|
**Size**: 224 MB (32,503 files)
|
|
**Plugin Code**: ~2,500 lines
|