Skip to content

Magento catalog dependency feeds ​

This page covers the Magento-side consumers for Meduse attributes, families, product-family assignment, menu snapshots, product files, and product images. Its source evidence is mixed: SyncAttributes, SyncFamily, their new exception classes, and their focused unit-test sources were reviewed at 6bf5acf477d65bcfd54182549fc9487e110da007; the other axelites/menzzo paths listed here remain pinned to 3edcc1e24e9a1e8382dc1bad0dfb3158b8074cea. These source references do not establish which revision is deployed or whether a cron or FTP worker is running.

For the main product feed and its category mapping, see Meduse catalog import. The Meduse screens and producer-side behavior are described in catalog structure changes and media workflows. The existing catalog and ASIR handoff reference documents a later Logidav step; this page does not re-review that repository's source.

Scheduled consumers ​

The Meduse Magento module declares the six dependency jobs below in the meduse cron group, all on */5 * * * * (every five minutes): axelites_meduse_syncAttributes, axelites_meduse_savefamily, axelites_meduse_sync_files, axelites_meduse_save_product_images, axelites_meduse_save_product_family, and axelites_meduse_sync_meduse_menu. The declaration proves the configured schedule in source, not execution on a server. The seventh job, axelites_meduse_syncproducts, is covered in catalog import. See the cron registrations.

View diagram source
flowchart LR
  AF[Attribute JSON feed] --> A[SyncAttributes]
  FF[Family CSV feed] --> F[SyncFamily]
  A --> EAV[(Product EAV attributes and mappings)]
  F --> SET[(Magento attribute sets and mapping)]
  EAV --> ACK[menzzo feed complete]
  SET --> ACK
  ACK -. "Logidav handoff described in existing docs" .-> L[Logidav pending]

  PF[Product-family CSV] --> P[SyncProductFamily]
  P --> PROD[(Product attribute_set_id)]
  P --> DONE[Configured export-product-families complete]

  MJ[Desktop and Mobile menu JSON] --> M[SyncMeduseMenu]
  M --> CFG[(axelites_system_data menu snapshot)]
  CFG --> REGEN[Menu regeneration]

  FILE[Product file CSV] --> S[SyncFiles]
  IMG[Product image CSV] --> I[SyncProductImages]
  S --> MEDIA[(Magento product attributes and files)]
  I --> GALLERY[(Magento product media gallery)]

Diagram

Attribute and family definitions ​

SyncAttributes lists .txt JSON entries from /meduse/connectors/menzzo/export_attributes/pending and later from processing. It accepts listing entries with a string text name and a .txt extension, then probes each name with FTP cd(): a successful change is treated as a directory, skipped, and followed by an attempt to restore the listing directory. A failed cd() leaves the entry eligible for processing, so the code alone does not prove that every candidate is a regular file. For non-empty content, the cron attempts to move the input from pending to processing, creates or loads a product EAV attribute, applies supported label and option data, and records the Meduse-to-Magento attribute mapping. It places the loaded model's Magento attribute ID in idMagento, calls write() to rewrite the file in processing, and attempts the move to complete; it does not check that the field contains a non-empty ID or that the FTP write/move succeeded. A Throwable caught inside the per-file attribute operation adds menzzo_error and attempts the move to failed. The listing helper runs outside that catch: if restoring the FTP directory fails, it closes the connection and throws UnableToRestoreFtpDirectoryException; this directory-probe failure has no menzzo_error or file acknowledgement, and later normal close/cache-clear calls are skipped. Empty files are skipped and remain where found. See the attribute receiver and directory probe, restore exception, and focused tests.

SyncFamily consumes CSV files from the relative FTP path meduse/connectors/menzzo/family/pending. It attempts to move each file to processing, resolves the Meduse family code through mz_meduse_attribute_set_mapping, or matches/creates a Magento attribute set, then renames the set and applies requested attribute additions and removals. When an attribute set is available, the receiver appends magento_attribute_set_name to the CSV header and rows before attempting to move the file to complete. If no set is available, that completion move is still attempted without the field. Translation and image-attribute updates remain commented out. If FTP read() returns false, the cron throws UnableToReadFamilyFileException. Its Exception handler logs the failure and writes magento_obs only when parsed rows are available; on a false read no rows have been loaded, so no annotation is written. It then attempts to move the file from processing to failed. If directory setup or listing throws an Exception before a destination path is assigned, the handler logs and rethrows without a file move or annotation; the cache clear after the handler is skipped. The handler catches Exception, not every Throwable, and FTP move return values are not checked. See family intake, read failure, and error handling, read exception, acknowledgement write, and focused tests.

Neither attribute nor family execution wraps these writes in a transaction. A later failure can leave earlier EAV, mapping or attribute-set changes persisted while the code attempts a move to failed; failed does not mean that nothing changed, and an unchecked FTP move does not prove the file reached that directory.

The two feed names end in menzzo, not logidav. Magento's source shows the attribute ID and attribute-set name being written back into those feed files before it attempts to move them into their menzzo/.../complete directories. It does not show Magento writing directly to a connectors/logidav path. The existing Logidav reference page describes a subsequent move from the menzzo completion folders into Logidav pending folders, but that downstream step is documentation evidence here, not source-verified by this page.

The path strings also need careful comparison across FTP clients. SyncFamily uses a relative path without a leading slash; SyncAttributes uses a slash-prefixed path. The Meduse reference page describes its producer paths without a leading slash. The active FTP root and the equivalence of these strings in the deployed namespace were not checked, so the code-level acknowledgement fields do not prove that an external reader received them.

Assign a family to products ​

SyncProductFamily reads CSV files under the configured FTP prefix plus export-product-families/pending, moves them to processing, and parses rows with | as the delimiter. For each SKU it looks up catalog_product_entity; when the SKU exists and the family code is present in Magento's Meduse-to-attribute-set mapping, it updates attribute_set_id. The file then moves to complete; this feed has no added acknowledgement column. See product-family intake and assignment and the assignment update.

An unknown SKU or unmapped family is skipped without a row-level error, and the file can still reach complete. Reindexing follows the file moves; individual indexer exceptions are logged and the remaining indexers continue. A wider exception is logged and swallowed by the cron, which can leave the current file in processing. Completion therefore records the file move, not that every product changed or every index succeeded.

Category and menu inputs ​

There are two distinct menu-shaped inputs in Magento source.

SyncMeduseMenu reads JSON snapshots from /meduse/connectors/menzzo/menu/menu_json/Desktop and /Mobile. A file must be named menu_json_<positive store id>.txt; the ID must be among allowed active stores. The validator requires non-empty JSON no larger than 5 MiB, a list-shaped category tree, and positive category IDs. The importer calls menu link and image sanitizers, downloads category images into Magento media, then upserts the snapshot in axelites_system_data under axelites_menu_meduse/items_Desktop or items_Mobile, scoped to the store. See the menu snapshot consumer, validator, and config-data importer.

These JSON files are not moved into processing, complete, or failed. Invalid snapshots are logged and skipped; the same file is considered again on a later run. When a snapshot passes validation and the importer returns success, the cron asks Axelites\Core\Cron\Menu to regenerate the menu. The source does not compare old and new JSON before setting its changed flag, and the regeneration call is not a receipt that a storefront rendered the new menu.

Axelites\Core\Cron\Menu::getMeduseMenuConfig() contains a separate CSV handler at /meduse/connectors/menzzo/menu/pending. It reads semicolon-delimited rows, resolves Meduse category codes through meduse_product_categories_mapping, maps the channel to a Magento store, and writes typesense_attributes_to_show and hide_category category values. It moves the CSV through processing, then to complete or failed; category reindex and menu/cache regeneration follow the file move. See category/menu CSV handling.

The CSV handler is not listed in the Meduse module's cron declarations, and the pinned source search found no other reference to the method name. Its code path exists, while its current trigger and runtime use remain unverified. The category mapping used by the main product import is covered in Meduse catalog import.

Product files ​

SyncFiles consumes pipe-delimited CSV files under the configured FTP prefix plus export-product-files/pending. It moves files to processing, looks products up by SKU, and handles three fields: pdf_notice, url_visuel_dimensions_produit, and url_video_deballage. For a PDF notice or dimensions file it fetches the configured Meduse media URL and writes under Magento media in fiche-produit/notice/ or fiche-produit/dim-produit/; it stores the resulting file name in the corresponding product EAV attribute. The unboxing value is saved as a URL. Empty values remove the varchar EAV row. If a media fetch returns no content, the file loop can still reach complete without writing that EAV value. See file-feed processing and EAV updates/removal.

The file moves to complete before product reindexing. Unknown SKUs are skipped and the file still completes. There is no explicit failed move in this receiver; a throwable is logged and swallowed, so an earlier failure can leave a file in processing.

Product images ​

SyncProductImages consumes pipe-delimited CSV files under the configured FTP prefix plus export-product-images/pending. It snapshots filenames found in pending, moves those files to processing, and only processes processing files whose names appeared in that snapshot. The images field is base64-decoded and unserialized; each row is matched by SKU. Magento downloads the referenced image into its media directory under catalog/product/, updates the product gallery and image-role EAV values with direct database writes, and wraps each product's database changes in a transaction. See image intake and file state, local image storage, and gallery/role persistence.

saveImagesProduct() catches a product-level exception, rolls back the database transaction, and returns after logging. It does not remove local image files written before a later database error. The outer loop can then move the feed to complete anyway. A failed image download can also be logged while the product transaction continues. Unknown SKUs are skipped while the file can complete. Empty files stay in processing; a file-level exception is logged without an active move to failed. Since the cron only processes names found in pending during that run, an older file left in processing is not retried by this path unless it appears in pending again. The source contains no per-row acknowledgement field.

Reading completion state ​

For attributes and families, the Magento code adds a receiver result (idMagento or magento_attribute_set_name) and moves the file to its menzzo completion directory. For product-family, file, and image feeds, directory movement is the only file-level acknowledgement. Menu JSON snapshots have no file acknowledgement at all. Across these paths, complete can coexist with skipped rows, a swallowed image save failure, or index/cache work that ran afterward.

Source review establishes the Magento-side code paths at the pinned commit. The active FTP namespace, cron execution, actual Magento records and media, downstream Logidav transfer, and rendered category/menu/product results remain unverified. For a non-production acceptance check, correlate one disposable feed file through its source path, Magento completion state, persisted record/media, and final rendered result; treat each as a separate gate.

Internal developer documentation for Menzzo systems.