In Prestashop, you can add most simple attributes directly from the Admin, but you can also create customised attributes directly in the code.

Sending simple attributes from the Prestashop Admin

Note: This feature only works from v.5.3.2. Check this guide to see how to upgrade

In the Prestashop Admin, start by going to the following section:
Prestashop 1.7: Catalog -> Attributes & Features
Prestashop 1.6: Catalog -> Product Attributes

Here you can see all the attributes you have available:

Find the names of the attributes you want to add.

Then go to Modules And Services -> Clerk -> Configure.

Under Data Sync Settings, type in the attribute Names separated by comma in Additional Fields:


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, that are more advanced, can be added through the module files in FTP.

This file handles the product-attributes:
modules->clerk->controllers->front->product.php

Each attribute has its own fieldHandler , which is used to pull it, in the function __construct 

Simply add your attribute here, with the following syntax:

$this->addFieldHandler('CLERK_ATTRIBUTE_NAME',function($product)
   return PRESTASHOP_LOGIC;

Where CLERK_ATTRIBUTE_NAME defines the name you want it to have in Clerk.io and PRESTASHOP_LOGICis the code for pulling the attribute from Prestashop.

Lastly, include your new attributes in the function getDefaultFields()  in the bottom of the file.



Did this answer your question?