Changeset 1674925
- Timestamp:
- 06/09/2017 05:01:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pixel-de-facebook-para-wocommerce/trunk/fb-conf.php
r1674924 r1674925 74 74 content_type: 'product', 75 75 content_name: '<?php echo $name ?>', 76 content_ids: ['<?php echo (isset($options['product_ref']) && $options['product_ref']) ? $id : $sku;?>']76 content_ids: ['<?php echo $id;/*(isset($options['product_ref']) && $options['product_ref']) ? $id : $sku;*/ ?>'] 77 77 }); 78 78 </script> … … 97 97 } 98 98 99 $content_ids = implode( ', ',$item); 100 99 101 /*if($cart_prods) foreach ($cart_prods as $cart_prod){ 100 102 $product_variation_id = $cart_prod['variation_id']; … … 113 115 fbq('track', 'AddToCart', { 114 116 content_type: 'product', 115 content_ids: [<?php echo (isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);?>],117 content_ids: [<?php echo $content_ids; /*(isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);*/ ?>], 116 118 value: <?php echo $cart_total ?>, 117 119 currency:'<?php echo $options['currency'];?>' … … 138 140 } 139 141 142 $content_ids = implode( ', ',$item); 143 140 144 /*if($cart_prods) foreach ($cart_prods as $cart_prod){ 141 145 $product_variation_id = $cart_prod['variation_id']; … … 154 158 fbq('track', 'InitiateCheckout', { 155 159 content_type: 'product', 156 content_ids: [<?php echo (isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);?>],160 content_ids: [<?php echo $content_ids; /*(isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);*/ ?>], 157 161 value: <?php echo $cart_total ?>, 158 162 currency:'<?php echo $options['currency'];?>' … … 184 188 $sku[] = "'".$prod->get_sku()."'";*/ 185 189 } 190 191 $content_ids = implode( ', ',$item); 186 192 ?> 187 193 <!-- Facebook Purchase event --> … … 189 195 fbq('track', 'Purchase', { 190 196 content_type: 'product', 191 content_ids: [<?php echo (isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);?>],197 content_ids: [<?php echo $content_ids; /*(isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$item) : implode( ', ',$sku);*/ ?>], 192 198 value: <?php echo $order_total ?>, 193 199 currency:'<?php echo $options['currency'];?>'
Note: See TracChangeset
for help on using the changeset viewer.