Company accounts: moving from older modules

For shops that kept companies in Customer prices or in a customer attribute: the commands to move them, check the result and fix what is left.

⏱ 5 minAdvancedUpdated 14 Oct 2026

This article is only for shops that already managed companies with older Magelan modules: Customer prices (up to version 0.6) or Company orders (OrderFilter), which recognised a company by the customer attribute "podjetje". New shops do not need it.

Before you start

  • access to the command line of the server (ask your maintainer if needed),
  • a database backup,
  • to know whether your companies were in Customer prices or in a customer attribute.

1. Moving from Customer prices

When the module is upgraded the companies are copied automatically (same IDs). To repeat the copy run:

bin/magento magelan:company:import-from-customerprices

The old tables are never changed or dropped. The companies copied this way are active and have no administrator until you make one.

2. Moving from a customer attribute

First run a trial without writing anything and read the list:

bin/magento magelan:company:import-from-attribute --dry-run

The command lists the companies it would make. The customer with the lowest ID becomes the administrator. Two spellings of one name are two companies, so read the list before you run the command without --dry-run:

bin/magento magelan:company:import-from-attribute

It makes the companies and links the earlier orders to them. The options --attribute=podjetje (the attribute name) and --status=active (the status of the new companies) are available if needed.

3. Check the result

bin/magento magelan:company:check

The command lists companies without an administrator, orders waiting for approval for more than a week, and stale invitations.

4. Fixes after the move

  1. In Customers › Companies find the companies without an administrator and in the Users section make somebody the administrator (or invite one).

  2. Look for duplicate names and merge the companies by hand: add the users to one and delete the other (customers and orders stay).

  3. Check the status, the customer group and the default limit of the companies.

Companies moved this way are active, so their users can order at once. If you do not want that, block them in Customers › Companies before you open the shop.

Common problems

The companies have no administrator after the move

That is expected when moving from Customer prices. Add an administrator in the company form.

The same company was moved twice

The name was written in two ways in the attribute. Move the users to one company and delete the other.

Was this article helpful?

Related