Jump to content

Edit History

TAB_Social

TAB_Social

Hi there, I have a similar concern, with a JavaScript from Intercom. Unfortunately I have no idea about JavaScript or Smarty.

I want to change the variables. I also need the customer name, customer email address and the date the account was created.

Here is the script (original from Intercom) with the variables I would have to change.

<script>

  window.intercomSettings = {
    app_id: "123xxx",
    name: "Jane Doe", // Full name
    email: "[email protected]", // Email address
    created_at: "1312182000" // Signup date as a Unix timestamp
  };
</script>

<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/123xxx';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();</script>

 

If I insert the variables that are already mentioned here, is that right? 

<script>

  window.intercomSettings = {
    app_id: "XXX",
    name: "prestashop.customer.firstname prestashop.customer.lastname", // Full name
    email: "prestashop.customer.email", // Email address
    created_at: "What here???" // Signup date as a Unix timestamp
  };
</script>

The variables:
prestashop.customer.firstname
prestashop.customer.lastname
I thought up myself because I found similar variables as Smarty.

These ones:
{$Customer.lastname}
{$Customer.FirstName}
{$Customer.email}
{$Customer.date_add}

This looks very similar to those already mentioned here. 

It looks like they always have the same pattern or schema. just swap the $ sign with prestashop.

 

Would the variable for the account creation time also be in the same pattern?

like: prestashop.customer.date_add

As I said, I have absolutely no idea, I just saw the pattern.

 

I've already searched the internet, but I understand too little of the code. So I hope someone can please tell me what I have to insert here exactly.

Thank you in advance
Greetings Michael

PS: Please excuse my bad english, i hope everything is understandable. 🤔

TAB_Social

TAB_Social

Hi there, I have a similar concern, with a JavaScript from Intercom. Unfortunately I have no idea about JavaScript or Smarty.

I want to change the variables. I also need the customer name, customer email address and the date the account was created.

Here is the script (original from Intercom) with the variables I would have to change.

<script>

  window.intercomSettings = {
    app_id: "123xxx",
    name: "Jane Doe", // Full name
    email: "[email protected]", // Email address
    created_at: "1312182000" // Signup date as a Unix timestamp
  };
</script>

<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/p1qcm3l3';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();</script>

 

If I insert the variables that are already mentioned here, is that right? 

<script>

  window.intercomSettings = {
    app_id: "XXX",
    name: "prestashop.customer.firstname prestashop.customer.lastname", // Full name
    email: "prestashop.customer.email", // Email address
    created_at: "What here???" // Signup date as a Unix timestamp
  };
</script>

The variables:
prestashop.customer.firstname
prestashop.customer.lastname
I thought up myself because I found similar variables as Smarty.

These ones:
{$Customer.lastname}
{$Customer.FirstName}
{$Customer.email}
{$Customer.date_add}

This looks very similar to those already mentioned here. 

It looks like they always have the same pattern or schema. just swap the $ sign with prestashop.

 

Would the variable for the account creation time also be in the same pattern?

like: prestashop.customer.date_add

As I said, I have absolutely no idea, I just saw the pattern.

 

I've already searched the internet, but I understand too little of the code. So I hope someone can please tell me what I have to insert here exactly.

Thank you in advance
Greetings Michael

PS: Please excuse my bad english, i hope everything is understandable. 🤔

×
×
  • Create New...