fix: Extract design_name and print_size from order items for Trello
- design_name: Get product name from first order item
- print_size: Calculate from item dimensions (wallpaper: length in m, mural: width x height in cm)
- Add fallback values ('') when items/dimensions unavailable
- Prevents null errors when populating Trello custom fields
This commit is contained in:
@@ -21,6 +21,20 @@ return [
|
||||
'board_id' => env('TRELLO_BOARD_ID') ?: ($env['TRELLO_BOARD_ID'] ?? null),
|
||||
'webhook_secret' => env('TRELLO_WEBHOOK_SECRET') ?: ($env['TRELLO_WEBHOOK_SECRET'] ?? null),
|
||||
|
||||
'custom_fields' => [
|
||||
'order_id' => '695792226064b67fb4bd46f0',
|
||||
'design_name' => '69579233dbdfa1de96beef7f',
|
||||
'customer_name' => '6957924221e31eb4a7a271b0',
|
||||
'print_size' => '6957926dab26ae511aaf17e9',
|
||||
|
||||
'ship_w' => '6957929435cdaf8b318b16d5',
|
||||
'ship_h' => '695792a3c5ef01fd66d9bb66',
|
||||
'ship_l' => '695792bdba79b9499f0f5f59',
|
||||
'weight' => '695792c98bc7955d6bd796c0',
|
||||
|
||||
'date_created' => '695792ef2545efa98ef8dce7',
|
||||
],
|
||||
|
||||
'lists' => [
|
||||
'standard' => [
|
||||
'new_order' => env('TRELLO_LIST_ID_NEW_ORDER') ?: ($env['TRELLO_LIST_ID_NEW_ORDER'] ?? null),
|
||||
|
||||
Reference in New Issue
Block a user