e-satisfaction

The #1 Humanized Marketing Platform

Prestashop Plugin: Add metadata (Advanced Integration)

Follow

Supported Versions

This guide is suitable for the following plugin versions:

  • 1.6
  • 1.7

Browse

In order to add extra metadata for your Browse questionnaire, you should edit the following file:

~/modules/esatisfaction/views/templates/hook/header.tpl

You should edit the integration script and add all the needed metadata like the following example:

window.esat_config = {
application_id: "{/literal}{$app_id}{literal}",
collection: {
"BROWSE_QUESTIONNAIRE_ID": {
questionnaire_id: "BROWSE_QUESTIONNAIRE_ID",
metadata: {
questionnaire: {
"metadata_name": "metadata_value",
},
responder: {
"metadata_name": "metadata_value",
},
}
}
}
};

Note: You should add the metadata at the Application Settings panel in the e-satisfaction Dashboard first, if they do not exist already. 

Checkout

In order to add extra metadata for your Checkout questionnaire, you should edit the following file:

~/modules/esatisfaction/views/templates/hook/checkout.tpl

You should edit the integration script and add all the needed metadata like the following example:

window.esat_config = {
application_id: "{/literal}{$app_id}{literal}",
collection: {
"{/literal}{$checkout_quest_id}{literal}": {
'questionnaire_id': "{/literal}{$checkout_quest_id}{literal}",
'metadata' : {
'responder' : {
'email': "{/literal}{$customer_email}{literal}",
'phone_number': "{/literal}{$customer_phone}{literal}",
'extra_metadata_name': 'metadata_value'
},
'questionnaire' : {
'transaction_id': "{/literal}{$order_id}{literal}",
'transaction_date': "{/literal}{$order_date}{literal}",
'store_pickup': {/literal}{$is_store_pickup}{literal},
'extra_metadata_name': 'metadata_value'
}
}
}
}
};

Note: You should add the metadata at the Application Settings panel in the e-satisfaction Dashboard first, if they do not exist already. 

Was this article helpful?
0 out of 0 found this helpful

Comments