Welcome to Trytond Magento’s documentation!¶
Contents:
Introduction¶
Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content and functionality of their eCommerce store. It comes with a variety of tools, necessary for building a successful online shop.
A new bridge between Tryton and Magento has been initiated by Openlabs team. This module allows synchronization of Magento with Tryton. It supports Synchronization of Customers, Addresses, Product Categories, Products, Order Status, and Orders.
This tutorial will guide you through installation, setup and configuring magento integration module. To start with this see Installation first.
Installation¶
Install Trytond Magento integration module by following the listed steps. Continue reading to know more.
Installation of Magento Core API extension¶
The steps which you must follow in order to complete the Trytond Magento Integration installation are:
Step 1: Installation of Magento core API extension
- Log in to Magento Admin Area:

- After login to magento Admin Panel,
Now go to System >> Magento Connect >> Magento Connect Manager
, click it
and you will be taken to a login page, The Magento Connect Manager section
allows you to edit settings for installation:
A new page will open for the Magento Connect Manager and you will be asked to provide your administrative credentials again. Key in your username and password, the same username and password you entered while login to magento:
Once logged in you will see 2 sections: Extensions and Settings. It is recommended to verify the options chosen in the Settings section first. Click on the
Settings
tab and change preferred state to ‘Beta’. (As of this date the plug-in is beta). Save your settings:
Note
Default state is Stable
, change it to Beta
.
Go to the first tab i.e.,
Extensions
to install magento-connector,The following is the extension key that you need to copy and paste in your Magento Connect area; it will be used for installing the magento-connector:
Once you have chosen an extension key, click Install, and wait for the module to appear for installation with Magento Connect version matching your current Magento version:
Install it by clicking
Proceed
, refer below screenshot:The new extension will be automatically downloaded and installed. If there is a problem with the installation, there will be information about it so that you know what should be done to resolve it. After the extension is properly installed a screen for a successful installation will appear:
To check the installed module, go to bottom of your page as it is located at the end of the list, see below:
Installation of Magento Integration [Tryton module]¶
Step 2: Installation of Magento Integration [Tryton module]
Downloading the module
The module source is available online and can be downloaded from here.
The module can be downloaded as a zip file or can be cloned by running
$ git clone https://github.com/openlabs/trytond-magento.git
OR
$ git clone git@github.com:openlabs/trytond-magento.git
If the module is downloaded as a zip file, extract the module which will give a directory.
From the module directory, use the setup.py script with the command:
$ python setup.py install
Installing the module in Tryton database
Run Trytond Server¶
$ trytond -c <path-to-trytond-configuration-file>
Run Tryton client¶
Login to Tryton¶
Now login with created database and configure tryton using configuration wizard displayed.
Now go to Administration >> Modules
and click on Modules that will open
list of all modules installed.

Now Click on the Magento module, mark for installation and perform pending installation/upgrade as shown below:


Clicking the icon shown above will open a wizard to start upgradation. Click on Start Upgrade as shown below and the module is ready to use.

Configuration¶
The module requires certain initial configuration to be done in magento instance to set the management tool.
Magento instance¶
Go to Magento
and and click Magento Instances on the
left menu.
It refers to a magento installation identifiable after setting the API for
Magento Site URL
, API User
and API Password / Key
Create a new
Magento instance
by clicking create.Give the Magento instance a title(i.e. Name), company and API settings which includes magento site URL, API user and API password. Magento Site URL is the URL used to access Store pages. You can set it on a per Store basis.
After filling the record, now click on the
Save
button to save the record.After this, the Connection can be tested by clicking on
Test Connection
button at the bottom.If the connection with magento is successful, a window will pop-up showing successful installation:
Now the websites can be imported from Magento by clicking
Import Websites
button from magento. This will import all the websites for this magento instance.
5a. Order States: This allows the user to configure the states mapping according to his/her convenience. This map is used to process orders in Tryton when they are imported. This is also used to map the order status on magento when sales are exported. This also allows the user to determine in which state he/she wants the order to be imported in. Refer below for all order states that are generated after the websites are imported.
User can use the default order states map, Refer table for default order states. The states map can be changed at his/her convenience.
Magento State Tryton State New Sale Quotation Cancelled Sale Cancelled Closed Sale Done Complete Sale Done Processing Sale Processing On Hold Sale Quotation Pending Payment Invoice Waiting Payment Review Invoice Waiting 5b. Import all the websites for current magento instance:
5c. Click on the
Instance Website
on the left menu, it shows the websites for its respective magento instance.5d. All the webstores of the imported websites, also get imported. Go to
Website Store
on the left menu to see imported website stores:
Import Carriers/ Shipping Methods
: It will import and refresh index of all the carriers from Magento to Tryton, see below :Click on
Import Carriers/ Shipping Methods
button, it will import carriers from magento to Tryton, see below:
During the import process, magento checks your data to ensure that it’s correct.
After importing, edit Magento instance first to configure the carrier. Just click on carrier imported from the carriers list and edit it as per the preference.
Import Order States
: Click on Import Order States button to get theorders states of magento to Tryton, it imports/refresh the order state but not any settings by user:
During import, the states in Tryton will get mapped accordingly to magento states. Refer table again to understand the Magento-Tryton states mapping. See below:
To know more about Magento Website, Magento Store, Magento Store, refer How To Use.
How To Use¶
This section will guide you to understand the usability of the Trytond Magento module.
Magento Website¶
A magento instance can have multiple websites. They act as parents of stores.
A website consists of one or more stores.
To manage your website you need to navigate to Magento
and click on Instance Website.

The above screen shows a website, where a bi-directional integration for import catalog, update catalog, export catalog and export_inventory can be easily done.
Below are the operations a user can perform through wizard:
- Import Catalog
- Update Catalog
- Export Catalog
- Update Catalog
Import Catalog
Under Magento -> Instance Website, choose the desired website. Click on
Import Magento Product Catalog
. This will import all the product
categories and products in a tree structure as on magento for this website,
see below screenshot:

Update Catalog
After Importing the products, catalog can also be updated by clicking on the
Update Catalog
. This will update the products with details, like
name, default_code/SKU, description & prices.

Note
This behaviour can be easily extended by a developer as per his needs
Export Catalog
To export catalog, do the following:
- Go to
Magento >> Instance Website
, and choose a website to export its catalog, and click onExport Product Catalog To Magento
.
2. Now you get a wizard screen where you can add information which you would like to export. This exports the products of the current website.
Choose the magento category, which has been imported from the magento.
Select
Attribute Set
from drop-down menu, it shows the list of entity attributes belonging to the products you add:Now add products to export. This wizard takes these products under the category chosen above.
- Now after the items are selected, click on continue, this will load the exported products to magento:
Export Inventory
Click on Export Inventory
to export product stock information from Tryton
to Magento for the website.


Click on the Continue button to export product stock data to magento for the website.
Note
Each product in a website must be unique!
Note
A website must be unique in an magento instance
Website Store¶
Magento Website Store or Store view groups
Go to Magento
and open Website Store.

Stores are children
of websites. The visibility of products and categories
is managed in magento at store level by specifying the root category on a store.
A store can have multiple store views.
Note
A store must be unique in a website
Click on any store. You will see an “Export tier prices’ icon.

What is Price Tier?
Price Tier on a source represents the default value to be used while sending tier prices for a product from Tryton to Magento. The product also has a similar table like this in Magento. If there are no entries in the table of the product, then these tiers are used.
Tier pricing is a tool that allows you to set different prices for items of higher quantities. For example: You sell stationery supplies and want to offer a deal wherein, if the customer buys three or more paper products, then he/she can save money when compared to buying just only one. Now, import these tier prices to the Magento store.:


Store View¶
Magento Website Store View
Go to Magento
and open Website Store View.
To browse the store at the front-end, a store needs one or more store views. It allows for multiple presentations of a store. Most implementations use store views for different languages.
See the screenshot below, it will show all the Store View
with corresponding
Store

Open any store view for Import Orders, Export Order Status, and Export Shipment Status
Import Orders
This will import all sale orders placed on this store view on magento.

When you click on Import Orders
, a wizard prompts you to import
orders.

When you click on continue, all the sale orders from Magento for current store view are imported. It will open views for the sale orders that are being imported.

If date is specified for Last Order Import Time
, then it will import
sale orders updated after that date.
Export Order Status
This will export order/shipment status to Magento for current “Magento instance” from Tryton. It will export all the edited/updated shipments. If “export tracking information” check box is ticked, the module will only export the shipments that have a carrier and tracking reference and are marked as “Done”.

When you click on “Export order status”, a wizard will ask your approval for exporting the order status.

Clicking continue will export status of all sale orders to magento for current store view.
If Last Order Export Time
is specified, it will export status of sale
orders updated only after this time.
Export Shipment Status
This wizard will export shipment status of all the shipments related to this
store view. You need to tick the checkbox, Export Tracking Information
for
exporting tracking information related to this store view.


How it Works¶
This section explains how import and export of orders between Tryton and Magento works. First, lets start with creating the sale orders:
Create Sale Orders in Magento¶
Under the ‘Sales’ tab in the Magento admin panel, click on ‘Create New Order’ button. This will allow you to add sale orders to your products. The order process consists of several simple steps. You can start by adding an item to the cart, then proceed to checkout. After that, select a checkout method, fill the billing and shipping information, select a payment method and place the order. See below how to Create New Order.
Note
All the data represented below is demo data and is only for demonstration purposes.
Sale in Magento

Orders in Magento
You can review all your orders from the Magento admin panel> Sales > Orders. In the previous section, we placed a list of orders. Click on it to see how it appears:

Orders are imported as Sales¶
Orders placed in Magento Admin Panel are imported in Tryton from Store
View
. See below:

An order in Magento has a number of entities related to it which are imported in Tryton as described below:
- The Order is imported as a Sale. The sale in Tryton can be identified by the Order Number which will be same as the order reference in Magento. Internally the matching is done using the ID of the order as generated by Magento.
- The date on which the order is generated.
- The Customer who placed the order as a Sale.
- The products, i.e., the products bought in the order by the customer are imported as Sale lines. The product in each of these lines is created as product in Tryton, if it does not already exist.
A window pop-ups to import all sale orders placed on this store view. Enter Continue, refer screenshot shown below:

Order imported as Sales in Tryton
Sales >> Sales

Note
When the order import takes place again, the changes in the state of the orders in Magento will be updated in Tryton.
Cancellation Of Sale Order¶
You can edit an order by clicking on it and modify it to your preference. To
cancel the order click on Cancel
:

Now state has been changed to cancelled, see below
Cancelled Sale Order

Now to export the changes to Magento, refer export order
Exporting Order Status from Tryton to Magento¶
Once the order is processed in Tryton, the shipping status of the order based on delivery is updated on Magento by Export Order.

This will export order’s status to magento for this store view
- The status of orders which are imported in Tryton will be exported to Magento as Cancelled once they are marked Cancelled by editing sale order from Tryton.
Note
This feature is currently available for Cancelled Orders
About Openlabs Technologies and Consulting Private Limited¶
Openlabs builds custom software solutions in the realm of Open Source. We provide clients with tailor-made, innovative solutions that cater to their specific needs. We work on business process re-engineering, ERP implementation, Open Source ERP, OpenERP, Tryton, Python Application Development, Web application development, Training and support, server maintenance, building websites and much more. Openlabs thrives on creativity and innovation. We are the winner of NASSCOM EMERGE Top 50 2012 and feature in the list of 2013 Top 100 Red Herring Asia finalists.
Technical Support¶
OPENLABS TECHNOLOGIES & CONSULTING (P) LIMITED
SDF L-12A, Noida Special Economic Zone (NSEZ), Phase II Noida-201306, U.P, India
Regd. Office: 2J, Skyline Daffodil, Petta, Thrippunithura, Kochi-682301, Kerala, India
w: www.openlabs.co.in | t: +1 813 793 6736
For support or addition of any novel feature, customers or developers can mail us at support@openlabs.co.in.