How to install Acquia's Custom Objects plugin?

Hello sir. i wish to add item to custom object product with contect link.
but i’m getting only the data of the contact without the product data.

NB: the is no log error

my code:

CURLOPT_POSTFIELDS => array(
‘firstname’ => ‘Test’,
‘lastname’ => ‘DBS’,
‘email’ => ‘sys@gmail.com’,
‘customObjects’ => array(
‘data’ => array(
array(
‘id’ => 12, // Custom Object ID or alias for Products
‘alias’ => ‘products’,
‘data’ => array(
array(
‘name’ => ‘Order’,
‘attributes’ => array(
‘productprice’ => ‘8545’,
‘productID’ => ‘PD132’

                  )
              )
          )
      )
  )

)
/
)
));

Hi,

I’m having issues with installing it with PHP 8.1 and Mautic 5.0.3.
I tried both:

  • Release_ACS-2023.12.01-9
  • RELEASE_ACS-2022.09.02

Still same error after php8.1 bin/console mautic:plugins:install no update
If I run the php8.1 bin/console cache:clear then mautic is out I need to delete the folder plugins/CustomObjectsBundle/ and then again cache clear and it is back again.

Any help?

Thanks in advance.

Hi @janoslaszlo, I’m also having the same issue, just on the 5.0.3 version. Did you find a solution?

Hey, the Custom Objects plugin is not yet ready for Mautic 5.

The composer.json file is where you can find the plugin requirements for all Mautic plugins:

The work needed to make the plugin compatible with Mautic 5 is in this pull request:

Please, get involved with testing if you’d like to speed up the process.

1 Like

I have an Issue Linking Custom Objects together via API please anyone have don it before ?

These errors are showing in the log: No error log

Steps I have tried to fix the problem: This is the JSON structure of my code. it work only by linking the Contact with the custom object.
{
“email”: “{{1.billing.email}}”,
“firstname”: “{{1.billing.first_name}}”,
“lasname”: “{{1.billing.last_name}}”,
“phone”: “{{1.billing.phone}}”,
“last_active”: “{{1.date_created}}”,
“tags”: “{{1.meta_data.value}}”,
“customObjects”: {
“data”: [
{
“id”: 1,
“alias”: “product”,
“data”: [
{
“name”: “{{1.line_items.name}}”,
“attributes”: {
“prix”: “{{1.line_items.price}}”,
“id”: “{{1.line_items.id}}”
}
}
]
},
{
“id”: 2,
“alias”: “sale”,
“data”: [
{
“name”: “{{1.line_items.name}}”,
“montant-total”: “{{1.line_items.total}}”,
“quantite”: “{{1.line_items.quantity}}”,
“date-de-vente”: “{{1.date_created}}”
}
]
}
],
“relationships”: {
“vente”: {
“parent”: “product”,
“alias”: “sale”,
“data”: [
{
“name”: “{{2.line_items.name}}”,
“montant-total”: “{{2.line_items.total}}”,
“quantite”: “{{2.line_items.quantity}}”,
“date-de-vente”: “{{2.date_created}}”
}
]
}
}
}
}

I don’t see in the docs that it is possible to link custom items together. Where did you see it is possible?

Just wanted to know if the is a rout in the Custome object to link object together

After a while I finally got the plugin working. Maybe helpfull for other people who ran into the same problems. We’re running Mautic 4.4.12, with php 8.0.

First I tried to install the plugin with the following command (as www-data): php /var/www/html/bin/console mautic:marketplace:install acquia/mc-cs-plugin-custom-objects

That didn’t work. I got an error:

afbeelding

Then I did what I normally do when installing a plugin:

  1. I copied the link to the github file. I used the branch @joeyk mentioned before: RELEASE_ACS-2022.09.02
  2. Go to the plugin directory → cd /var/www/html/plugins
  3. Download the zip file with the wget command: wget https://github.com/acquia/mc-cs-plugin-custom-objects/archive/refs/heads/RELEASE_ACS-2022.09.02.zip
  4. Unzip the file: unzip RELEASE_ACS-2022.09.02.zip
  5. Change the name: mv mc-cs-plugin-custom-objects-RELEASE_ACS-2022.09.02 CustomObjectsBundle
  6. Install plugins: php /var/www/html/bin/console mautic:plugins:install
  7. Then I got the message there were no plugins updated of installed
  8. Clear cache: php /var/www/html/bin/console cache:clear
  9. Then I tried to install the plugin again with the same command as in step 7.
  10. I got this error message

  1. I added the -vvv paarameter to my command to install the plugin: php /var/www/html/bin/console mautic:plugins:install -vvv
  2. I logged in to Mautic and on the right in the settings menu there was a Custom Objects menu item.

Hope this helps someone!

1 Like