$setting = new Cart66Setting();
            if (!empty($product->s3Bucket) && !empty($product->s3File)) {
                require_once CART66_PATH . '/models/Cart66AmazonS3.php';
                $link = Cart66AmazonS3::prepareS3Url($product->s3Bucket, $product->s3File, '1 minute');
                wp_redirect($link);
                exit;
            } else {
                $dir = Cart66Setting::getValue('product_folder');
                $path = $dir . DIRECTORY_SEPARATOR . $product->download_path;
                Cart66Common::downloadFile($path);
            }
            exit;
        } else {
            echo '<p>' . __("You have exceeded the maximum number of downloads for this product", "cart66") . '.</p>';
            $order = new Cart66Order();
            $order->loadByDuid($_GET['duid']);
            if (empty($order->id)) {
                echo "<h2>This order is no longer in the system</h2>";
                exit;
            }
        }
    }
}
if (!$ajaxRefresh) {
    if (Cart66Setting::getValue('enable_google_analytics') == 1 && !Cart66Setting::getValue('use_other_analytics_plugin')) {
        ?>
    <script type="text/javascript">
      /* <![CDATA[ */
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '<?php 
        echo Cart66Setting::getValue("google_analytics_wpid");