Facebook Pixel Dynamic Events

Hello

i am trying to configure facebook dynamic events on my site. I have installed Pageview event that works great on all pages.

Only on product pages i need to insert that code:


Content_name, Content_Category, Content_Ids and Value must be variables. I have tried almost anything but it doesnt work. For example i tried:

content_name: '{/literal}{$item.product}{literal}',

content_ids: ['{/literal}{$product_id}{literal}'],

value: '{$item.price}',

<?php echo $product_id; ?>

but nothing worked.

Could you help me?

Thanks in advance

Looks like the code was added to the Product details page? Add the following code to see the content of the $product array

{$product|fn_print_r}

for this code will show product ID,

{$product.product_id}

Hello

i am trying to configure facebook dynamic events on my site. I have installed Pageview event that works great on all pages.

Only on product pages i need to insert that code:


Content_name, Content_Category, Content_Ids and Value must be variables. I have tried almost anything but it doesnt work. For example i tried:

content_name: '{/literal}{$item.product}{literal}',

content_ids: ['{/literal}{$product_id}{literal}'],

value: '{$item.price}',

but nothing worked.

Could you help me?

Thanks in advance

Were you able to make it work ?

Looks like the code was added to the Product details page? Add the following code to see the content of the $product array

{$product|fn_print_r}

for this code will show product ID,

{$product.product_id}

Nothing is displayed on using this , it seems this variable is not accesible on the Product Detail page in the layout.

Did you clear the cache?

Did you clear the cache?

I am adding this code on Design LAyouts > Location : Proucts > Custom HTML but its not showing the values. It just print it directly.

view-source:http://www.fleaffair.com/peach-color-nakkashi-beautifull-saree.html

I am adding this code on Design LAyouts > Location : Proucts > Custom HTML but its not showing the values. It just print it directly.

view-source:http://www.fleaffair.com/peach-color-nakkashi-beautifull-saree.html

It worked thanks. Can you tell me how can I print the category in text from $product.category_ids

Try

{foreach from=$product.category_ids item=c}
    {$c|fn_get_category_name}
{/foreach}

It worked thanks.

It worked thanks.

You are welcome!

Where we can get the complet product data array names?


Regards

Where we can get the complet product data array names?

Regards

Please clarify your question

Where we can get the complet product data array names?

Regards

Use this in the tpl file.

....
{/literal}
{$product|fn_print_r}{literal}
....