Magento - Long Term Support (OpenMage)

repository·main·Indexed 21 days ago

https://github.com/openmage/magento-lts

An unofficial, community-driven alternative to official Magento Community Edition (CE) releases. OpenMage focuses on stability, security patches, bug fixes, and high backwards compatibility, integrating community improvements directly into the codebase.

Tokens
58.3K
Snippets
240
Records
310
Agent score
76%

What's inside OpenMage

  1. Overview of OpenMage JSON-RPC API

    main
    The OpenMage JSON-RPC API provides a lightweight, language-agnostic interface for third-party applications to interact with an OpenMage store. It allows for managing products, categories, inventory, orders, shipments, customers, and sales data. The API is implemented via the Mage_Api_Model_Server_Adapter_Jsonrpc adapter and uses the Zend_Json_Server component. All requests are routed through the /api/jsonrpc URL endpoint.
  2. Overview of Magento - Long Term Support (OpenMage)

    main
    Magento - Long Term Support (OpenMage) is an unofficial, community-driven project designed as a dependable alternative to official Magento Community Edition (CE) releases. It aims to integrate community improvements directly while maintaining high backwards compatibility with official releases. It is suitable for developers seeking a stable, community-maintained version of Magento with integrated security patches and bug fixes.
  3. Use AOEpeople/Aoe_Scheduler for Cron management

    main

    The Aoe_Scheduler module provides several capabilities for managing complex background tasks in Magento:

    • Job Management: Manage cron jobs more effectively than the default Magento implementation.
    • Visualization: View a timeline of cron executions to understand scheduling and overlaps.
    • Insight & Debugging: Gain visibility into background processes to identify and troubleshoot failures.
    • Interfaces: Access cron management via a Command Line Interface (CLI) and a web service interface.
    • Optimization: Improves cron execution performance on your server.
  4. Understand OpenMage LTS vs Magento CE

    main
    OpenMage LTS is an unofficial, community-driven alternative to the official Magento Community Edition (CE) releases. It aims to provide a dependable platform by integrating community improvements directly while maintaining high levels of backwards compatibility with official releases.
  5. Understand OpenMage LTS versioning and release policy

    main

    OpenMage follows strict Semantic Versioning (SemVer). The release lifecycle is managed based on MAJOR, MINOR, and PATCH levels to balance new features with stability:

    • PATCH updates: Always provided to the latest MAJOR.MINOR version.
    • MINOR updates: Always provided to the latest MAJOR version.
    • Long-term support: The latest MAJOR.MINOR branch for each MAJOR version receives PATCH updates for at least 2 years from the inception of the initial MAJOR version release.

    For detailed definitions of these terms, refer to the RFC 0002 - Release Schedule.

  6. Manage Catalog Product Attribute Media via JSON-RPC

    main

    The catalog_product_attribute_media API allows you to manage product images, including retrieving all images for a product, fetching specific image metadata, creating new images using Base64 encoding, updating existing image data, and removing images.

    Common parameters across these methods include:

    • productId (int|string, required): The Product ID or SKU.
    • store (string|int, optional): The Store ID or code.
    • identifierType (string, optional): Use 'sku' if the productId is a SKU, or null if it is an ID.
  7. Batch multiple requests with `multiCall`

    main

    To improve performance when making multiple API calls, use the multiCall method. This allows you to send an array of method calls in a single request. The params array for multiCall should contain the session_id followed by an array of calls, where each call is an array containing ["resource.method", [parameters]].

    {
      "jsonrpc": "2.0",
      "method": "multiCall",
      "params": [
        "session_id",
        [
          ["catalog_product.list", [filter_parameters]],
          ["catalog_product.info", [product_id]]
        ]
      ],
      "id": 1
    }
  8. Upgrade to OpenMage 20.x: Session and Cache improvements

    main

    OpenMage 20.x introduced several performance and configuration improvements:

    • Redis Session Support: Redis is now a valid option for global/session_save.
    • EAV Caching: Mage_Eav_Model_Config has been rewritten to cache all EAV entity and attribute reads.
    • Website Level Cache: Website-level configuration caching is now enabled.
  9. Compare XML and JSON response structures

    main

    Magento API responses can be retrieved in either XML or JSON. The JSON format is a direct mapping of the XML structure.

    Error Mapping Example: An XML error structure:

    <messages>
        <error>
            <data_item>
                <code>404</code>
                <message>Resource not found.</message>
            </data_item>
        </error>
    </messages>

    Is transformed into the following JSON:

    {"messages":{"error":[{"code":404,"message":"Resource not found."}]}}

    Data Mapping Example: An XML list of stock items:

    <?xml version="1.0"?>
    <magento_api>
        <data_item>
            <item_id>1</item_id>
            <product_id>1</product_id>
            <stock_id>1</stock_id>
            <qty>99.0000</qty>
            <low_stock_date></low_stock_date>
        </data_item>
    </magento_api>

    Is transformed into the following JSON:

    [{"item_id":"1","product_id":"1","stock_id":"1","qty":"99.0000","low_stock_date":null}]
  10. Check Magento 1 compatibility for OpenMage LTS

    main

    Compatibility with Magento 1.9.4.x depends on the OpenMage LTS version series:

    • OpenMage LTS 19.x: These versions are mostly backward-compatible with Magento 1.9.4.x.
    • OpenMage LTS 20.x and later: These versions contain more significant changes and may not be 100% backward-compatible. While the project prioritizes minimizing migration and upgrade effort, users should expect breaking changes in these major versions.
  11. Use HTTP methods to interact with the Magento REST API

    main

    Magento's REST API is accessed via HTTP. The API follows REST architecture principles where the same URL can perform different actions depending on the HTTP request method used. The four main methods supported are GET, POST, PUT, and DELETE.

    # Retrieve a customer
    GET https://om.ddev.site/rest/customers/123
    
    # Delete the same customer
    DELETE https://om.ddev.site/rest/customers/123