Sending simple attributes from the Magento 2 Admin

If the attributes you want to send are already available as simple attributes in your Magento 2 admin, they can easily be added on the Extension page.

Go to Stores->Configuration->Clerk->Configuration

Under Synchronization -> Additonal Fields, write the attribute names separated by comma:

Click Save Config in the right corner.

After implementing your attributes, go to my.clerk.io->Data and click Start New Data Sync in the upper right corner.


Sending custom attributes

Custom attributes, can be added through the extension in FTP.

This file handles the product attributes:
vendor->clerk->magento2->Model->Adapter->Product.php

Each attribute has its own fieldHandler, in the function addFieldHandlers() 

Simply add your attribute here, with the following syntax:

$this->addFieldHandler('CLERK_ATTRIBUTE_NAME', function($item) {
   return MAGENTO2_LOGIC;
});

Where CLERK_ATTRIBUTE_NAME defines the name you want it to have in Clerk.io, and MAGENTO2_LOGICis the code for pulling the attribute from Magento 2.

Lastly, include your new attributes in the Clerk.io extension in the Magento 2 admin, under Synchronization -> Additional Fields.

After implementing your attributes, go to my.clerk.io->Data and click Start New Data Sync in the upper right corner.

Did this answer your question?