Skip to content

[v5] Example 7 in the Readme is throwing error PHP Warning - Array to string conversion #43

@geminigeek

Description

@geminigeek

hi,

mautic version : v5.0.4
i am using example 7 from readme as it is , i am getting this error, it seems the example is missing a line to set cart ?

https://github.com/Logicify/mautic-advanced-templates-bundle?tab=readme-ov-file#example-7-rendering-structured-data-from-tokens

[2024-10-01T19:46:44.399235+00:00] mautic.WARNING: PHP Warning - Array to string conversion - in file /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php - at line 679 [] {"hostname":"7a0715642990","pid":3822}

the result of using the code is

Item Name: (SKU: )

post body used to send tokens

{
  "tokens":{
    "{cart}": [{"sku":"A100","name":"Item 1"},{"sku":"Z200","name":"Item 2"}]
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions