AtroPIM

Intro

AtroCore is an Open-Source data management software that serves as the basis for a powerful Product Information Management (AtroPIM) and Digital Asset Management (AtroDAM) and also Project Management (PM).

It was built on EspoCRM and they still share the tech stack (PHP and backbone.js) and the core functionality in their API and how entities are being set up and their is some resemblance in their UI.

AtroCore/PIM/DAM is available on-premise and as a service. Their code is public and in active development.

The last point is a pro and a con at the same time, since they introduce breaking changes occasionally, without really documenting them. This is critical, if their API is used for third-party clients. I'm often one update away from breaking our app.

This document is a collection of solutions in my work with AtroPIM.

Installation

Install AtroPIM on Ionos Managed Server

Prerequisite

Make sure you know about the following topics related to Ionos Managed Servers/Webhosting.

Prepare Installation

Download atrocore/skeleton-pim files for composer as described in the docs

Missing ext-imagick Dependency

PHP ext-imagick extension is a requirement to install AtroPIM, but that's not available on Ionos Managed Server. To get around this limitation, add the following to the downloaded composer.json.

{
  "name": "atrocore/skeleton-pim",
  "description": "Skeleton for AtroPIM",
  "homepage": "https://atropim.com",
  "minimum-stability": "stable",
  "require": {
      "atrocore/core": "*",
      "atrocore/pim": "*",
      "atrocore/dam": "*",
-     "atrocore/export-feeds": "*"
+     "atrocore/import-feeds": "*",
+     "calcinai/php-imagick": "dev-master"
+ },
+ "config": {
+   "platform":{
+     "ext-imagick": "3.4.4"
+   }
+ },
  "repositories": [
      {
          "type": "composer",
          "url": "https://packagist.atrocore.com/packages.json?id=common"
      }
  ]
}

The config.platform part fakes the existence of ext-imagick. In order to use ext-imagick methods (which AtroDAM relies on), require calcinai/php-imagick, a PHP wrapper for command line ImageMagick utils compatible with PECL::Imagick.1

Install

Install AtroPIM with composer as described

php composer.phar update

You can't change file ownership on the managed server, so you can skip Step 3.

Set up the cronjob via CLI and create the database with Ionos web interface (MySQL 5.7).

Start the installation wizard.

If everything went smoothly (and I can't guarantee that) you should be able to use AtroPIM.

Fix Module Manager and Cronjobs

AtroPIM doesn't work properly if their Scheduled Jobs are not executed. By default, AtroPIM expects the PHP binary, used to execute scripts on the command line, to be either php or usr/bin/php (whatever the script detects).

On Ionos Managed Server, there is a PHP 4 binary under this path2, so everything will fail. But, you can call all available PHP versions by adding the desired version, like this: usr/bin/php8.1-cli.

In order to use that in AtroPIM open data/config.php and add the phpBinPath key.


<?php
return [
    'phpBinPath' => 'php8.1-cli',
];

To be sure the cronjob is set up correctly, check Administration/Module Manager if there is still an error message like The composer daemon is not running! Probably the daemon is reloading now….

In this case, check data/config.php for an unique appId key3. This is especially important if multiple instances are running on the same server (for development or staging) ^b45734

Update

Update log stuck at "Starting..."

Using the AtroCore API in 3rd Party Clients

When consuming their #API (https://demo.atropim.com/apidocs/) in a third-party client it's highly recommended to:

The reason is, Atro* is in active development without a public roadmap, cryptic or absent notes in the changelog and no API versioning. Every update is a make it or break it situation.


  1. As of 2021-06-10 the most important methods that AtroDAM is using are only available in the master branch, therefore use "dev-master" as version. 

  2. Just run php -v to verify 

  3. https://github.com/atrocore/atrocore/blob/master/app/Espo/Console/Cron.php#L82C48-L82C48