Jump to content



Member Since 23 Apr 2014
Offline Last Active Jun 08 2016 08:10 AM

Topics I've Started

Smarty Variables On Checkout Complete

07 June 2016 - 10:55 AM



I try to write code for a loop on checkout complete. My code at the moment is: 


test("setCurrency", "978");
{foreach from=$order_info.products item="product" key="key"}
test("addItem", {
id: "{$product.product_id}"
,price: {math equation="x / y" x=$product.price y=1.24 format="%.2f"}
,quantity: "{$product.amount}"
,payout: "1"
,category: "{$product.main_category.category_id}"
1. Product ID is ok.
2. Price is ok.
3. Quantity is ok
4. Category isnt ok. I need to show category id of each product but i cant. Any idea? 
5. Payout istnt ok. I need to show number based on category ID.
Any help is more than welcome 

Facebook Pixel Dynamic Events

12 February 2016 - 08:52 AM



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: 


<!-- Custom Audience Pixel Code -->
// Insert Your Custom Audience Pixel ID below.
fbq('init', '<FB_PIXEL_ID>');
fbq('track', 'PageView');
fbq('track', 'ViewContent', {
content_name: 'Really Fast Running Shoes',
content_category: 'Apparel & Accessories > Shoes',
content_ids: ['1234'],
content_type: 'product',
value: 0.50,
currency: 'USD'


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