Skip to content

fix: correct default order status IDs and add fallback for zero values#91

Merged
biz87 merged 1 commit intobetafrom
dev/1.4.2-beta1
Feb 15, 2026
Merged

fix: correct default order status IDs and add fallback for zero values#91
biz87 merged 1 commit intobetafrom
dev/1.4.2-beta1

Conversation

@biz87
Copy link
Copy Markdown
Member

@biz87 biz87 commented Feb 15, 2026

Summary

  • Fixed default values for ms3_status_new (0→2), ms3_status_paid (0→3), ms3_status_canceled (0→5) in _build/elements/settings.php
  • Added ?: default fallback in all 11 getOption('ms3_status_*') calls across 7 files to handle existing installations where settings are saved with value 0

Root cause

$modx->getOption('ms3_status_new', null, 2) returns 0 (not the fallback 2) when the setting exists with value 0. This caused OrderStatusService::change() to fail with "Status not found" error on order submit.

Fixes #89

🤖 Generated with Claude Code

System settings ms3_status_new, ms3_status_paid, ms3_status_canceled had
default value 0, causing "Status not found" error on order submit.
Fixed defaults to match seeded statuses (new:2, paid:3, canceled:5) and
added ?: fallback in all getOption calls to handle existing installations
where settings are already saved with value 0.

Fixes #89

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@biz87 biz87 merged commit a9bc27a into beta Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Оформить заказ (кнопка)

2 participants