Akeneo Crash Course, Pt.1: Basic Setup

About This Guide

Knowledge transfer is critical when trying to master new complex tools within a limited time. Such was the case when a few of our staff needed a fast-track introduction to the Akeneo-Magento stack with a dedicated connector module, to take over a live project. This need manifested in developing a set of internal documentation pages, and later became the prerequisite for creating this guide.

This is part one of the four-part crash course, meant to help teams and individuals gain an understanding of basic entities, tools and processes involved in operating the tech stack mentioned above. Follow through in a step-by-step manner to learn and get a practical experience with

Notes: 

The current guide is based on a real-life Magento project, making use of our own proprietary Magento-Akeneo connector module. Thus, certain project-specific details had to be generalised in order to present more universal instruction. An example of this is a mentioning of a path starting with “Profile > Connector > …”, where ‘Profile’ refers to your Magento profile, and ‘Connector’ – to the connector module you are using.

As for the connector module, a quick search around the Internet should present you with multiple options to choose from. Pick the one you prefer, and follow along.

In this part you will learn how to set up clean Akeneo and Magento instances, as well as sync some of the default entities.


Magento 2 Setup

  1. Set up Magento 2.1 (Community) locally without sample data.
  2. Install Magento-Akeneo connector module.

Note: Ensure version compatibility between Magento and the Magento-Akeneo connector.

The command to install clean db with admin user:

php bin/magento setup:install --base-url=http://example-project.host/ \
--db-host=127.0.0.1 --db-name=test_example-project --db-user=root --db-password=root \
--admin-firstname=exampleName --admin-lastname=exampleLastname --admin-email=test@example.com\
--admin-user=exampleUser --admin-password=examplePassword --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

Akeneo Setup

Make sure Docker is installed and running locally.

Use Akeneo Community Edition Docker version setup guide (not manual): https://docs.akeneo.com/4.0/install_pim/docker/installation_docker.html.

Use make dev to import Akeneo sample data.

Execute the necessary command from the guide above to launch a consumer daemon.

Expected result: You should have a working instance of Akeneo PIM with a URL http://127.0.0.1:8080/  and credentials: admin/admin.

Connect M2 and Akeneo

Create Akeneo API access to allow using it from M2.

Enter this API access in M2 under ‘Profile’ > ‘Connector’ > Configuration -> API Configurations. Save the configuration, and click “Test Connection”.

In the General section, set the channel to “Ecommerce”.

Note: Akeneo has case-sensitive Akeneo channel code.

Akeneo Connection Guide: https://help.akeneo.com/pim/serenity/articles/what-is-a-connection.html

Akeneo Sample Data Fix

Remove attribute “collection” from Akeneo.

Quick guide: https://webkul.com/blog/how-to-create-attributes-in-akeneo/

Execute M2 Import Commands

  • php bin/magento akeneoimport:attribute
  • php bin/magento akeneoimport:attribute-option
  • php bin/magento akeneoimport:category
  • php bin/magento akeneoimport:product

To monitor the process, check import logs: ‘Profile’ > ‘Connector’ > Import logs.

Expected result: Once the import is complete, the following should be created and imported from the Akeneo sample data:

  • products
  • categories 
  • attributes
  • attribute options
  • attribute sets
  • attribute groups

Fix Akeneo Products Completeness

Find which attributes are required and, using bulk update, fill them for all products. 100% on more than 500 products should be enough. 

Try importing products back into Akeneo.

Akeneo completeness guide: https://help.akeneo.com/pim/v4/articles/what-is-the-completeness.html
Akeneo bulk action guide: https://help.akeneo.com/pim/v4/articles/product-mass-actions.html

Important: Bulk update requires a running queue job daemon.

Example:

Previously there were 34 simple and 15 configurable products, now there should be 829 simple and 20 configurable.

Create New TEXT Attribute

Create a new Akeneo Group “Test_group”.

Under “Test_group” create a new Akeneo Text Attribute “Report” with “Value per locale” enabled.

Under the Family “Camcorders” add an attribute “Report”, and make it required for all channels.

Find all “Camcorders” products and fill the “Report” attribute.

Repeat products import into M2, and check if Magento products received this value

  • It will throw an error that the attribute is missing. 
  • Execute the attribute import, clean M2 cache and then execute the products import.
Akeneo Attributes Guide: https://help.akeneo.com/pim/serenity/articles/manage-your-attributes.html
Akeneo Attribute Groups Guide: https://help.akeneo.com/pim/serenity/articles/manage-your-attribute-groups.html
Akeneo Families Guide: https://help.akeneo.com/pim/serenity/articles/manage-your-families.html

Create New DROPDOWN Attribute

Under the “Test_group“ create a new Akeneo Dropdown Attribute “Version” with option codes “21“, “22“, “23“ and labels “Magento 2.1“, “Magento 2.2.“, “Magento 2.3“.

Add the “Version” attribute to the Family “Digital Cameras” and make sure it is required for all channels.

Choose ONE “Digital Cameras” product and fill ALL required attributes.

Repeat attributes import and attribute options import

  • Clear cache
  • Import products into M2
  • Check if Magento products received this value.  

Find this product in Magento and check if “Version“ was correctly imported.

Create New Family With Family Variant

Create the new Akeneo Family “T-Shirt“.

Assign attributes “price”, “name”, “description”, “color”, “size”.

Create 1-axis Family Variant “T-Shirt Basic“ with color and size as “configurable” attributes.

Make “name“ editable on the parent product level, and “description” – on the child product level.

Create a new Product Model with a Family Variant “T-Shirt Basic“.

Fill description.

Create a new child product with Size: L and Color: Black, and another with Size: M and Color: Red.

Fill name that contains specific product size and color.

Add the product to some random categories.

Repeat attributes import

  • Clear cache
  • Import products into M2
  • Check if these products appeared in Magento as configurable.

Important: Each product needs to be added to some category, otherwise, it will be skipped during the import to M2.

Akeneo Product Creation Guide: https://help.akeneo.com/pim/serenity/articles/create-a-product.html
Akeneo Add Variant Guide: https://help.akeneo.com/pim/serenity/articles/enrich-products-variants.html#add-a-variant

Create New FR and DE Magento Stores

Set up base settings:

In Magento go to Stores > Configuration and select Main website as the store view.

Go to General > Currency setup and set Allowed Currencies to EUR and USD.

Create and configure two new store views:

Go to Stores > All Stores and create two new store views: one for France and one for Germany.

Go back to Stores > Configuration and select French store as store view.

Under Locale Options, set the store view’s Locale to French(France).

Open General > Currency Setup and set the Default Display Currency to EUR.

Repeat the steps for the German view, except set the locale to German(Germany).

Set up product-locale-specific data in the Akeneo:

Open Products section in Akeneo and set the locale to French.

Same as in the “Fix products completeness” section above – using bulk actions, set product descriptions and prices.

Important: Bulk update requires a running queue job daemon.

Switch the locale to German and repeat the previous step.

Import into Magento:

Run bin\magento akeneoimport:product.

Clear Magento Cache.

Expected result:

  • When opening a product in edit mode and switching between the newly created store views: you should see that product descriptions change accordingly.
  • When switching to FR / DE store views in the front-end: currency should change from  USD to EUR. Changes should also occur in product descriptions and category names in the navigation bar.

Note: If you don’t see any products displayed on frontend, go to Stores > Configuration > Catalog > Inventory > Stock Options and set Display out of stock items to true.

Have you found this information helpful? Make sure to check out the rest of the guide: pt.2, pt.3 and pt.4.

Do you consider implementing Akeneo PIM in your business? Let us help you!

Any questions? Feel free to get in touch: book a free consultation or schedule a call!

If you enjoyed this post, you may also like