Migration of a site from MODX to 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1173
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    745
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Website Migration from MODX to 1C-Bitrix

MODX Revolution is a popular developer CMS. Flexible template system, Snippets, Chunks, TV variables — all this allows building practically any site. But when business requires full online store with 1C integration or corporate portal with CRM — MODX starts limiting. Switch to Bitrix solves the task, but requires understanding both systems.

MODX Data Model

MODX Revolution stores content in several key tables (default prefix modx_):

  • modx_site_content — all site resources: pages, articles, folders. Fields: id, pagetitle, longtitle, alias, content, introtext, parent, template, published, publishedon, createdby, createdon, menutitle, description, content_type, uri.
  • modx_site_tmplvar_contentvalues — TV variable values for resources: tmplvarid, contentid, value.
  • modx_site_tmplvars — TV variable definitions: name, caption, type, elements, default_text.
  • modx_site_templates — templates.
  • modx_users, modx_user_attributes — users.
  • modx_categories — snippet/chunk categories (not content).

For stores on miniShop2: msProduct, msProductOption, msCategory, msOrder, msOrderProduct — these are extension custom tables.

Page Tree

MODX builds site as resource tree. Each resource — potentially a page. In Bitrix this concept doesn't exist: site structure determined by physical files in directories + structure management in admin.

Static MODX pages (corporate site, "About", "Contact" sections) transferred two ways:

  1. As Bitrix pages — create PHP files in directories, content written via $APPLICATION->SetPageProperty() and components.
  2. As iblock elements — if many pages and they're homogeneous (e.g., blog).

TV Variables → Iblock Properties

Template Variables (TVs) — analog of iblock properties in Bitrix. Read all TVs from modx_site_tmplvars and project corresponding properties:

MODX TV Type Bitrix Property
text String
textarea / richtext HTML/text
image File (image)
file File
listbox-multiple / checkbox List (multiple)
date Date/time
number Number

Content Transfer

Script reads modx_site_content and for each resource of needed type:

  1. Determines iblock section by parent (recursively build sections tree beforehand).
  2. Collects TV values via JOIN modx_site_tmplvar_contentvaluesmodx_site_tmplvars.
  3. Creates iblock element via CIBlockElement::Add().

Field uri in MODX — ready URL-friendly address of resource. Save it as element CODE and use for 301-redirect formation.

Images. In TV variables of image type stored path like /assets/images/photo.jpg. Copy files to Bitrix server, register via CFile::MakeFileArray().

miniShop2 → Bitrix Catalog

If MODX had miniShop2:

  • msProduct (JOIN to modx_site_content) → Bitrix catalog iblock elements.
  • msProductOption — product options (color, size) → product offers.
  • msCategory → iblock sections.
  • msOrder / msOrderProductb_sale_order / b_sale_basket.
  • Prices from msProduct.priceb_catalog_price with needed price type.

Chunks, Snippets and Templates

Chunks (modx_site_htmlsnippets) and snippets (modx_site_snippets) — MODX template engine code (Smarty / Twig or native PHP). They don't transfer automatically. All functionality implemented anew via Bitrix components. This is most time-consuming stage if site used complex snippets (pdoMenu, pdoPage, FormLister etc.).

SEO

MODX with friendly_urls enabled builds URL by uri field. If site used AliasListing — URL could include full tree path. Collect old_uri → new_url mapping and write redirects.

Timeline

Stage Typical Duration
Audit MODX structure, TVs, extensions 1 day
Design infoblocks and map TVs 1 day
Develop content migration script 2–3 days
miniShop2 (if present) 2–4 days
Images and media files 1 day
Redirects and SEO 1 day
Testing 1 day
Total 7–11 working days

Without miniShop2, migration from MODX is relatively fast — data structure is clear, TVs map well to iblock properties.