In Magento 1, you can add custom product attributes to the Clerk.io extension, if needed.

You can make the changes in this file:

app->code->community->Clerk->Clerk->Model->Catalog->Product.php 

Adding simple attributes

If your attribute uses a standard Magento function, this can be implemented directly in Product.php.

The function getClerkExportData() builds the product-object, with all the attributes:

You can then add new attributes in the list with this syntax:

$data->setAttributeName($this->insertMagentoLogic());

where setAttributeName defines the name you want it to have in Clerk.io, and insertMagentoLogic();  uses a Magento logic to pull a value from the product.

Using custom attribute functions

Sometimes, a Magento attribute might require a more advanced logic, than a simple function. In this case, locate this file:

app->code->community->Clerk->Clerk->Model->Catalog->Productbase.php 

In Productbase.php you can write advanced PHP functions to load custom attributes.

After defining a function, you can include it in Product.php just like the existing functions.

For example: 

$data->setAge($this->getAge()); 


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

Did this answer your question?