Mage-Chili-Connector

Online-Documentation
Compatible with Magento 2.1.x – 2.2.6. and Chili-Publisher/ UGE 4.x, 5.x
Version: 1.5.4

Introduction

The „CHILI-Connector for Magento“ connects the world leading eCommerce platform “Magento” with the hottest online-document-editor „CHILI publisher“ from “CHILI publish”.

Use the full power of both systems to create different business solutions like web-to-print-solutions, marketing- and brand-management-platforms.

Visit http://www.mage-chili-connect.de/ for further information!

Prerequisites and Installation

Prerequisites

Magento 1.9.x
Magento 2.1.x – 2.2.6
ChiliPublisher 4.x, 5.x

Installation

Use the following commands within your ssh-commandline to install the extension.

  1. composer require enobis/module-chili-editor
  2. php bin/magento setup:upgrade
  3. php bin/magento setup:di:compile
  4. php bin/magento setup:static-content:deploy
  5. php bin/magento cache:clean
  6. php bin/magento indexer:reindex

Please note: The extension is not available via the magento-marketplace or packagist.org! The extension is only available via our private repository! In order to get access, a valid license-agreement is required!

Quickstart

  • Install the Mage-Chili-Connector extension – for installation instructions, please follow this guide
  • Login in to your magento-backend
  • Establish connection to CHILI-Server – Please fill in the appropiate credentials (stores->configuration->Chili->Chili Credentials) to establish a successfull connection to the CHILI-Server.
  • Connect to your  CHILI environment by filling in the environment-string into „Chili Environment“-configuration (stores->configuration->Chili->Chili Editor->Defaults)
  • Activate the CHILIpublisher in the storefront (stores->configuration->Chili->Chili Editor->Frontend)
  • Setup a product by enabling the chili-editor for this product (products->catalog->chili->“chili enabled“) and connect to your document with the chili document-id (products->catalog->chili->“chili document“)
  • Go to the storefront and check if you see the „edit“-button within your product-view. Pressing „edit“ opens the CHILIpublisher within the editor panel of magento.

Configuration Options

To establish a valid connection to your CHILI-Server, you have please fill in the appropiate credentials. Please the corresponding documentation of your CHILI-Server!

Parameter Example Scope Comment
Chili Environment URL http://chili.yourdomain.com/CHILI/
main.asmx?WSDL
Storeview URL to Chili-Webservice
Chili Environment BaseUrl http://chili.yourdomain.com/CHILI/ Storeview
Chili Admin Api User admin Global Administration User des Admin-Environment
Chili Admin Api Key ****** Global Password of Admin-User
Chili Api Key ****** Storeview Password des API-Users

Configure the default configuration for the CHILIpublisher. Please note: This are the default configurations – most of them can be overwritten at product level.

Parameter Example Scope Comment
Chili Environment Chili-Demo Storeview String of Environment
Chili Workspace Workspace1 Storeview  List of chili-workspaces
Chili View Preference View Preference 1 Storeview List of view preferences
Chili Editor Engine Flash, HTML5 Storeview Selection of chili-editor engine
Chili Editor Anonymous User Yes, No Storeview Ability to use the chili-editor for anonymous users
Chili Editor Workspace Admin Yes, No Storeview Activation of the chili-editor-workspace-admin
Chili Editor Viewer Only Yes, No Storeview Activation of viewer-only-mode
Chili PDF Export Settings PDF-Export-Setting 1, PDF-Export-Setting 2, etc. Storeview Selection of PDF-export settings
Same Origin Domain Chili yourdomain.com Storeview Selection of PDF-export settings
Chili Language DE, EN, etc. Storeview Selection of standard-language of the chili-editor
Chili Folder Document Order orders/{{date}}/{{order_id}}/{{item_id}} Storeview path to the folder to save corresponding chili document(s) of the order
Automatic Pdf Generation on Order Creation Yes, No Storeview Enable automatic, asyncronous pdf-export at checkout. Important: There will be now response to the customer in the storefront!
Automatic Pdf Generation Order Status Selection of available status website automatic pdf generation on order creation starts by default on every order status. Activate here only the status you need!
Chili Sync Quantity Mode None, Datasource Num Rows Storeview ability to use the number of datarows of the datasource to automatically assign the number of product items within the cart

Activate the CHILIpublisher and configure the default behaviour in the storefront.

Parameter Example Scope Comment
Chili Edtor Enabled Yes, No Storeview Activation of the chili-editor
Custom Editor Template Storeview Path to own editor template
Document Copy Method Original (No Copy)

Before Edit

After Edit

Storeview Selection of document-copy-mode while opening the chili-editor in the frontend

Original: Document will be edited within the original document

Before Edit: Document will be first copied to a user document (STANDARD)

After Edit: Document will be copied after editing the original version.

Allow Guest Editor Yes, No Storeview Chili-Editor can be used by guests.
Show Preview in Cart Yes, No Storeview Show a document preview in the cart?
Show edit document link in cart Yes, No Storeview enables direct document editing from the cart
Show edit document link in wishlist Yes, No Storeview enables direct document editing from the wishlist
Allow Pdf Download Links Yes, No Storeview Shows a download link in the customer account for direct downloading of the rendered pdf-documents
Alternative Panellayout Menu, sidebar, No Storeview Activates the different editor menu layouts – top menu (Beta-Feature: Not Production ready!), sidebar and gear-version
Add Customer Id to Editor Url Yes, No Storeview Enables automatic transfer of the customer_id to the chili-editor
URL Param Signature Enabled Yes, No Storeview advanced security signature parameter in chili-url. This can be used for e.g. to call external datasources in a more secure way.
Automatic Variable Assignment after Order Creation Enabled Yes, No Storeview Enables automatic transfer of order attributes to chili-document after order-creation. Note: Advanced feature! Deeper knowledge of server-settings for server-side rendering of chili-documents is mandatory!
Automatic Variables Assignment Mapping Grid Website definition of variables which are transfered/ injected into the chili-document after order-creation.
Direct add to cart Enabled Yes, No Website enables direct adding of chili documents to the cart without the need to edit them before. Beta-Feature: Not Production ready!
User specific asset directories Enabled Yes/ No Storeview Enable/ Disable support for user- / user-group specific asset directories
User Asset Directory String Storeview You can use {{customer_id}} or {{customer_email}} to transfer the values to the chili-variable %user%
Usergroup Asset Directory String Storeview You can use {{customer_group_id}} or {{customer_group_name}} to transfer the values to the chili-variable %userGroup%

Product-specific configuration parameters overwrite store-specific configuration parameters.

Parameter Example Scope Comment
Chili Edtor Enabled Yes, No Storeview Activation of the chili-editor
Chili Workspace Workspace1 Storeview List of chili-workspaces
Chili View Preference View Preference 1 Storeview List of view preferences
Chili Document 03a8e468-6bdc-4faa-aee0-3423fd90b262 Storeview Id of chili document! Get it from the Admin Interface of the CHILI-Server
Chili Document Constraint constraint1, constraint2, etc. Storeview List of document constraints
Chili Editor Engine Flash, HTML5 Storeview Selection of chili-editor engine
Chili Editor Anonymous User Yes, No Storeview Ability to use the chili-editor for anonymous users
Chili Editor Workspace Admin Yes, No Storeview Activation of the chili-editor-workspace-admin
Chili Editor Viewer Only Yes, No Storeview Activation of viewer-only-mode
Chili Editor Css #chili-navigation {display:none;} Storeview Use your own CSS-Code
Chili Editor Zoom 100 Storeview Zoom Level for CHILIpublisher
Chili Editor Javascript Your code goes here! Storeview Use your own Javascript-Code
Chili PDF Export Settings PDF-Export-Setting1, PDF-Export-Setting2, etc. Storeview Selection of PDF-export settings
Chili Sync Quantity Mode None, Datasource Num Rows Storeview ability to use the number of datarows of the datasource to automatically assign the number of product items within the cart

You can use the following „techniques“ to transfer data from Magento to CHILIpublisher.

  • product attribute value

You can activate data transfer within the product attributes management per attribute (stores->attributes->product->attribute option „used for chili documents“). The value of the attribute will be transfered automatically to the chili variable with the same name.

  • custom options values

You can use custom options to transfer their values to the variables of a chili document. Simply enter the name(s) of the chili variable(s) into the custom option field „Webtoprint Element Id“.

Hints:

  • You can use multiple custom options at the same time
  • You can use the „view mode“ to disable or to hide a custom option! Hidden custom options are still being transmitted to the chili document.
  • You can preassign custom options with customer- or customer address attribute values by using the following command syntax e.g. {{var customer.firstname}} or {{var customer.address.firstname}}. If you are using {{var customer.firstname_label}} you will retrieve the label value e.g. Dropdown-Labelvalues instead of Dropdown-Option-Ids.  Every customer and customer address attribute can be used!
  • customer id (of logged in user)

The customer_id of the logged in user will be transfered automatically by default.

  • order attributes (Version 1.3.0)

With version 1.3.0 you can use order attribute values for the chili document rendering. These attribute can be choosen dynamically on website level by adding them to the configuration. Use e.g. „order.increment_id“ to add the increment_id to your chili variable „orderid“. Or use „order_item.name“ to add the product name of the order item to the chili variable „productname“.

Important:

  • These order attribute values are added to the chili document after checkout.
  • For correct rendering of the chili document it´s important that the server can resolve it´s own domain name! Because this document manipulation needs an separate server-side-rendering process!

The Mage-Chili-Connector-extension enables you to transfer data between magento and CHILIpublisher automatically. For that the CHILI-Connector integrates the javascript-api of the CHILIpublisher. There are two directions of transfering data possible.

Extension update

Extension-Update via ssh

Update

Use the following commands within your ssh-commandline to update the extension.

  1. composer update
  2. php bin/magento database:upgrade
  3. php bin/magento setup:di:compile
  4. php bin/magento setup:static-content:deploy
  5. php bin/magento cache:clean
  6. php bin/magento indexer:reindex

Please note: The extension is not available via the magento-marketplace or packagist.org! The extension is only available via our private repository! In order to get access, a valid license-agreement is required!

Addons & Changelog

These addons can extend the functionality of the mage-chili-connector. The following addons are currently available. More addons will follow!

Nr. Name Description
1. Approval Workflow Plugin Workflow-Plugin for simple approval processes
2. My documents portal Advanced management of documents (drafts and bought documents) in one central place. Save, rework and duplicate documents easily. Work with Tags and workspace to organise your documents. Enable the customer to (re)render their documents in several different ways (different pdf-export-settings). Render your documents as an image (support for image rendering) – Release: 3rd quarter of 2018

We are permanently optimizing the connector. Please find below our changelog. If you have any suggestions – please let us know!

Version Name Description
1.0.0 Initial Relase Basic integration of chili-editor in magento incl. alternative panel layout
1.0.1 feature  support for configurable product
1.1.0 feature – read-out-function of chili-variables for custom options
– post of product attributes to chili editor
– product specific pdf export settings
– export settings for chili-documents
1.1.1 bugfix  qty-bug with magento 2.1.9
1.2.0 compatibility compatibility with magento 2.2
– post of customer_id to chili-editor
1.2.1 bugfix bugfix for some static-product-attributes
bugfix for passing static-product-attributes to the chilieditor-api
1.3.0 feature automatic order attribute value assignment
possibility to assign order attribute values to a chili document automatically.
1.3.1 compatibility  advanced compatibility with older magento2-versions
1.3.5 compatibility  optimized compatibility with configurable products
1.4.0 feature  support for user- and usergroup asset directories
1.4.1 feature optimized start of pdf-export via link, optional asynchronous pdf-export with checkout

until 1.4.0 the rendering process is started with opening the order in the backend or storefront of magento. Now the rendering process is started via a pdf-rendering link in the backend and frontend. In addtion to the pdf-export-link there is now an option to start the pdf-export at the end of the checkout automatically. Please note: This task runs asyncronous – there will be no response to the end user!

1.4.2 bugfix minor bugfix for rendering in multi-website-environments
1.4.3 compatibility compatibility with 2.2.4
1.4.4 bugfix  several minor bugs fixed
1.4.5 feature  direct document-edit-link in wishlist and cart
magento-bugfix for chilidocument-products based on configurable products (link from wishlist to product detail page)
1.4.6 compatibility advanced compatibility with configurable products – a message is displayed, if the customer returns from the wishlist or cart to the configurable product again and changes the product configuration
1.4.7 security Added hashed signature parameter in chili-url to work with. E.g. using the hash to secure calls for external datasource url´s
1.4.8 bugfix minor bugfixes
1.5.0 features – added 3rd (top)menu panel (beta – not ready for production!) as alternative chili editor panel (in addition to left sidebar and gear-menu; – order status related automatic pdf generation; – support for direct customer attribute value assignment to the chili document (similar to direct product attribute value assignment)
1.5.1 optimisation hidden custom options are also hidden in cart by default; including additional css-class to disable this feature
1.5.2 optimisation support for virtual products
1.5.3 features / optimisation chili sync quantity mode – ability to use number of datasource-rows for the cart quantity
1.5.4 bugfix start pdf-rendering process from backend depending on order status, reordering bug, minor bugfixes

Contact us!

You need help or more information?
Please send us an email to info@enobis.de –
we will contact you as soon as possible!