To create a support ticket, start a search

Product Export: Exporting a field from a external table


  • Store Commander version 2015-07-01
  • SC Grids Editor Pro Add-on - version 1.2
  • The field has to be present in the database and in a Product class override



We would like to export a field added to a table from another module.



  • To add the field to the list of available export fields, click on the add.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 (right hanside) > Export Process, add the following


if (in_array($switchObject, array('my_field'))) {
    $field = 0;
    $sql = "SELECT `".$switchObject."` 
            FROM " . _DB_PREFIX_ . "my_table 
            WHERE id_product=" . (int)$p->id;
    $res = Db::getInstance()->ExecuteS($sql);
    if (count($res)) {
        $field = (int)$res[0][$switchObject];


You will need to adapt this code to your needs.


  • Exit the editing window and you can use the field in your export mapping