Cast prices to float in getForBuilder.php
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6ec5f812e1
commit
bb03cb0533
1 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ function buildOptionsTree(array $allOptions, int $parentId): array {
|
||||||
'id' => 'opt_' . $opt['ItemID'],
|
'id' => 'opt_' . $opt['ItemID'],
|
||||||
'dbId' => (int) $opt['ItemID'],
|
'dbId' => (int) $opt['ItemID'],
|
||||||
'name' => $opt['Name'],
|
'name' => $opt['Name'],
|
||||||
'price' => $opt['Price'],
|
'price' => (float) $opt['Price'],
|
||||||
'isDefault' => (int) $opt['IsDefault'] === 1,
|
'isDefault' => (int) $opt['IsDefault'] === 1,
|
||||||
'sortOrder' => (int) $opt['SortOrder'],
|
'sortOrder' => (int) $opt['SortOrder'],
|
||||||
'requiresSelection' => (int) ($opt['RequiresSelection'] ?? 0) === 1,
|
'requiresSelection' => (int) ($opt['RequiresSelection'] ?? 0) === 1,
|
||||||
|
|
@ -258,7 +258,7 @@ try {
|
||||||
'id' => 'mod_' . $tid,
|
'id' => 'mod_' . $tid,
|
||||||
'dbId' => $tid,
|
'dbId' => $tid,
|
||||||
'name' => $t['Name'],
|
'name' => $t['Name'],
|
||||||
'price' => $t['Price'],
|
'price' => (float) $t['Price'],
|
||||||
'isDefault' => (int) $t['IsDefault'] === 1,
|
'isDefault' => (int) $t['IsDefault'] === 1,
|
||||||
'sortOrder' => (int) $t['SortOrder'],
|
'sortOrder' => (int) $t['SortOrder'],
|
||||||
'isTemplate' => true,
|
'isTemplate' => true,
|
||||||
|
|
@ -322,7 +322,7 @@ try {
|
||||||
'dbId' => $itemID,
|
'dbId' => $itemID,
|
||||||
'name' => $item['Name'],
|
'name' => $item['Name'],
|
||||||
'description' => $item['Description'] ?? '',
|
'description' => $item['Description'] ?? '',
|
||||||
'price' => $item['Price'],
|
'price' => (float) $item['Price'],
|
||||||
'imageUrl' => $itemImageUrl,
|
'imageUrl' => $itemImageUrl,
|
||||||
'photoTaskId' => null,
|
'photoTaskId' => null,
|
||||||
'modifiers' => $itemModifiers,
|
'modifiers' => $itemModifiers,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue