Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
Paul Konopik edited this page Feb 8, 2018 · 9 revisions

CoreMedia LiveContext: Custom eCommerce Integration for Magento

Description

Welcome to the CoreMedia Magento integration wiki!

This module is a guide to integrating CoreMedia LiveContext with Magento Commerce system. For more information, see the repository README.

Magento Installation

The documentation on the Magento Installation page describes how to install a Magento Commerce system in Version 2. This tutorial uses a basic installation of Magento including the Luma storefront provided as demo content within Magento.

This guide will also walk you through the installation of the CoreMedia widgets in the Magento system. These widgets will make it possible to add CoreMedia content to your Magento pages.

CoreMedia Magento Extension

The code in this repository contains an extension to CoreMedia LiveContext which enables CoreMedia customers to access and enhance Magento content within the CoreMedia Studio. The installation instructions for a clean CoreMedia LiveContext workspace with the Magento extension can be found here: CoreMedia Magento Extension Installation.

If you already have a CoreMedia LiveContext workspace, please see our documentation for enabling extensions. We've provided a chef cookbook for this extension to set the necessary properties for Magento in the CoreMedia applications.

CoreMedia Testsystem Fragments

Even if you do not yet have a CoreMedia LiveContext workspace, you can still add some test CoreMedia fragments into your Magento system to see how the integration works on the Magento side. We've provided a testsytem with fragments that you can insert into your Magento system via the CoreMedia widgets in this repository. Follow the Magento Intstallation guide to install the widgets using the testsystem configuration.

Integrating Magento with CoreMedia LiveContext 3

SET GLOBAL validate_password_policy=LOW;
alter user 'root'@'localhost' identified by '***';
drwxr-xr-x 3 magento apache   26 Dec  4 08:50 CoreMedia
-rw-r--r-- 1 magento apache 1177 Dec  4 08:50 coremedia_widget_instance_export.sql
  • In the LC3 workspace create a module modules/extensions/magento and copy the other folders plus pom.xml from the checked-out sources to this new folder.
  • Add magento to managed-extensions.txt and run mvn dependency:copy -Dartifact=com.coremedia.tools.extensions:extensions:1.6:jar:all -DlocalRepositoryDirectory=extensions-tool -Dtransitive=false -DoutputDirectory=tool -Dmdep.stripVersion=true -Dmdep.stripClassifier=true
java -jar tool/extensions.jar --task synchronize --extension-config-file workspace-configuration/extensions/extension-config.properties --task-input-file workspace-configuration/extensions/managed-extensions.txt
  • Provide an adapted node definition for LC deployment:
{
  "blueprint": {
    "hostname": "cm9",
    "loopback_hostname": "localhost",
    "maven_repository_url": "file://localhost/tmp/maven-repo",
    "tomcat": {
      "java_home": "/opt/jdk1.8.0_131"
    },
    "tools": {
      "java_home": "/opt/jdk1.8.0_131"
    },
    "solr": {
      "java_home": "/opt/jdk1.8.0_131"
    },
    "webapps": {
      "content-management-server": {
        "application.properties": {
          "cap.server.license": "properties/corem/license.zip"
        }
      },
      "master-live-server": {
        "application.properties": {
          "cap.server.license": "properties/corem/license.zip"
        }
      }
    },
    "livecontext": {
      "magento": {
        "host": "192.168.33.150",
        "user": "admin",
        "password": "CoreMedia@2017",
        "basePath": "/rest",
        "admin_uri": "/admin_pim7zv",
        "application.properties": {
          "livecontext.cookie.domain": ".DOMAIN"
        }
      }
    },
    "dev": {
      "content": {
        "content_zip": "file://localhost/tmp/content-users.zip"
      }
    }
  },
  "run_list": [
    "role[mysql]",
    "role[mongodb]",
    "role[lc3-magento-config]",
    "role[solr]",
    "role[management]",
    "role[publication]",
    "role[preview]",
    "role[preview-proxy]",
    "role[lc3-magento-preview-proxy]",
    "role[studio]",
    "role[studio-proxy]",
    "role[delivery]",
    "role[lc3-magento-delivery-proxy]",
    "recipe[blueprint-lc3-magento::overview]",
    "recipe[blueprint-lc3-magento::test-data-config]",
    "recipe[blueprint-dev-tooling::content]"
  ]
}
  • Import the Luma demo content onto your box: /opt/coremedia/content-management-server-tools/bin/cm serverimport -u admin -p admin -r content/
Clone this wiki locally