Jump to content

Willing to pay for CC6 Extensions for Google and Facebook


huggettm
 Share

Recommended Posts

Take this example. If you wanted the store name from the config data you would use:

{$CONFIG.store_name}

Screen Shot 2018-03-27 at 17.06.18.png

You can all see where I'm temporarily living now. :P

Looking at the Google Analytics example for;

{$GA_SUM.total}

You would see $GA_SUM in blue text at the left and under value an array key of "total".

Link to comment
Share on other sites

OK so I'd suggest adding the JavaScript with dummy data and then use the {debug} tool to replace each variable at a time. 

 

So for the google example you'd have;

    'revenue': '9.99',

You can then replace with;

    'revenue': '{$GA_SUM.total}',

Please note that the JavaScript curly braces may break the smarty syntax so the literal tag may be used. 

Link to comment
Share on other sites

Ok, for me UPG has not such mode and paypal throws up errors in sandbox mode.

 

I still do not have the conversion code correct:


<script>
  fbq('track', 'Purchase', {
    currency: 'USD',
    content_type: 'product',
    contents: [
        {
            item_price: '{/literal}{$item.price}{literal}',
            id: '{/literal}{$item.product_code}{literal}',
            quantity: '{/literal}{$item.quantity}{literal}',
        }
    ],
  });
</script>

Link to comment
Share on other sites

Which page / template file is this code from?

your literal tags are the wrong way around or you missed the open/close tags during your copy/paste :).  try this

{literal}<script>
  fbq('track', 'Purchase', {
    currency: 'USD',
    content_type: 'product',
    contents: [
        {
            item_price: '{/literal}{$item.price}{literal}',
            id: '{/literal}{$item.product_code}{literal}',
            quantity: '{/literal}{$item.quantity}{literal}',
        }
    ],
  });
</script>

{/literal}

Edited by Noodleman
Link to comment
Share on other sites

apologies i just didnt copy those in

{literal}<script>
  fbq('track', 'Purchase', {
    currency: 'USD',
    content_type: 'product',
    contents: [
        {
            item_price: '{/literal}{$item.price}{literal}',
            id: '{/literal}{$item.product_code}{literal}',
            quantity: '{/literal}{$item.quantity}{literal}',
        }
    ],
  });
</script>{/literal}

 

is what i had

Link to comment
Share on other sites

one thing it has flagged is that it cant match the products to the catalogue upload, so i am just modifying the google base export to provide the product code instead of product id

also, (although it doesnt work anyway as above) - the item price is not the full conversion value as it does not include shipping

Link to comment
Share on other sites

manually setting the product code matches it fine, so there is definitely something wrong in the export of the data (I think the same factor affects the google product reviews also)

Smarty gives this:

$ITEMS

Origin: "Smarty object"

Value

Array (1)
d8ae1ad510dbfcadfa2022b5ec743de1 => Array (52)
  product_id => "17834"
  product_code => "AC77145"
  quantity => 1
  description => "Day of the Dead Serape<br><br> Male - Adult - One Size Fits Most <br><br> Con..."
  description_short => ""
  price => 20.52
  name => "Day of the Dead Serape (Adult Costumes) - Male - One Size Fits Most"
  cat_id => "39"
  popularity => "292"
  sale_price => "0.00"
  cost_price => "13.38"
  stock_level => "339"
  stock_warning => "0"
  use_stock_level => "1"

 

 

using $item or $items makes no difference - do i need to define something else first?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...