To create a support ticket, start a search

Product Export: Exporting a Language field in Product Class


Prerequisites

The field has to be present in the database and in a Product class override

 

Target

We would like to export a language field added to PrestaShop Product class.

 

Setup

To add the field to the list of available export fields, click on the add_dis.png in the 'Add a field' panel and enter the following information:

What is the field ID?: my_field (has to correspond exactly to the field name in Product Class)

 

SC creates the field, you now need to populate the grid with:

ID: my_field
Name: my_field

 

From the Advanced Properties panel on the right handside:

- select the menu Export Process and enter:

if (in_array($switchObject, array('my_field'))) {
    $field = $p->my_field[$getIDlangByISO[$switchObjectLang]];
}

 

- select the menu Selectable Language and add the name if the field (separated by a comma if you are adding multiple fields)

Example: last_field,my_field

 

Exit the editing window.

The new field can now be included in your export mapping.

 




Related articles