Skip to content

Cyber-Duck/CyberDuck-vQmods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyberDuck-vQmods

This is a collection of vQmods for Opencart that we have developed. They have all been tested on Opencart Version 1.5.5.1

You need to install vQmod on your Opencart installation and then drop these files into your xml folder. Some modifications may require editing your template files.

TwitterCard

Add Twitter Card meta information to your products. You will need to ouput the meta data to your header.tpl

<?php
if (isset($twittercards)): foreach ($twittercards as $twittercard):
echo '<meta property="' . $twittercard['property'] . '" content="' . $twittercard['content'] . '" />';
endforeach; endif;
?>

OpenGraph

Add Facebook Opengraph meta information to your products. You will need to ouput the meta data to your header.tpl

<?php
if (isset($opengraphs)): foreach ($opengraphs as $opengraph):
echo '<meta property="' . $opengraph['property'] . '" content="' . $opengraph['content'] . '" />';
endforeach; endif;
?>

TransactionTracking

Add Google Ecommerce Transaction Tracking for completed orders. You will need to have the Asynchronous ga.js snippet somewhere on your page and then add this to your success.tpl

<?php if (isset($transaction) && !empty($transaction["id"])) { ?>
<script>
_gaq.push(['_addTrans',
  '<?php echo $transaction["id"];?>',        // transaction ID - required
  'Cyber-Duck',                              // affiliation or store name
  '<?php echo $transaction["total"];?>',     // total - required; Shown as "Revenue" in the
  '<?php echo $transaction["tax"];?>',       // tax
  '<?php echo $transaction["shipping"];?>',  // shipping
  '<?php echo $transaction["city"];?>',      // city
  '<?php echo $transaction["state"];?>',     // state or province
  '<?php echo $transaction["country"];?>'    // country
]);

<?php 
foreach ($transaction['products'] as $product) { ?>
_gaq.push(['_addItem',
    '<?php echo $transaction["id"];?>',      // transaction ID - required
    '<?php echo $product["model"];?>',       // SKU/code - required
    '<?php echo $product["name"];?>',        // product name
    '',                                      // category or variation
    '<?php echo $product["price"];?>',       // unit price - required
    '<?php echo $product["quantity"];?>'     // quantity - required
  ]);
<?php } ?>

_gaq.push(['_trackTrans']);
</script>
<?php } ?>

About

A collection of vQmods for Opencart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published