Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created April 7, 2014 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/10018435 to your computer and use it in GitHub Desktop.
Save bogdan/10018435 to your computer and use it in GitHub Desktop.
<html>
<head>
</head>
<body>
<!-- Begin Curebit integration code -->
<script type="text/javascript">
//<![CDATA[
(function(){function load_js(){var s=document.createElement('script');s.type='text/javascript';s.async=true; s.src='//d2jjzw81hqbuqv.cloudfront.net/assets/api/all-0.6.js'; var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x)} if(window.attachEvent)window.attachEvent('onload',load_js);else window.addEventListener('load',load_js,false)})();
var _curebitq = _curebitq || [];
_curebitq.push(['init', { site_id: 'mikesfirsttestsite' , server: 'http://localhost:3000'}]); /* REQUIRED - Replace with your Curebit Site ID */
var _curebit_order_items = [];
_curebit_order_items.push({
product_id: '123', /* REQUIRED - First Item Product ID */
price: '12.00', /* REQUIRED - First Item Unit Price */
quantity: '1', /* REQUIRED - First Item Quantity */
title: 'asdf', /* Optional - Name of product */
url: 'http://curebit1002.myshopify.com/products/asdf', /* Optional - URL for product */
image_url: '//cdn.shopify.com/s/images/admin/no-image-small.gif?4635d680ab229cd63a44e3aa2550432893770f85' /* Optional - URL for product image */
});
var couponCodes = [];
var _curebit_order_details = {
order_number: '1083247287401', /* REQUIRED - Order number */
order_date: '2014-04-07 06:54:26 -0400', /* REQUIRED - Order Date and Time (in UTC time zone, or as a timestamp with timezone information) */
email: 'integration@curebit.com', /* REQUIRED - Customer Email Address */
customer_id: '', /* Optional - Set to your internal customer ID for tracking */
subtotal: '12.00', /* REQUIRED - Purchase Subtotal */
coupon_code: couponCodes,
items: _curebit_order_items
};
_curebitq.push(['register_purchase', _curebit_order_details]);
//]]>
</script>
<!-- End Curebit integration code -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment