Redirect to Checkout from AJAX Cart

Note: This is an advanced customization guide that requires knowledge of the Shopify liquid, javascript, and HTML

In your Shopify store's theme editor, you'll want to search for the file "subscription-theme-footer"

This will turn up the following result:

Clicking on the file will open it up into your code editor. You'll want to scroll down to approximately line 65, or search for "reChargeSaveCartNoteAndRedirectToCart();"

You'll find and delete the following two lines of code (highlighted for your convenience):

And replace them with this entire block of code:

var paramCart = '&cart_token=' + (document.cookie.match('(^|; )cart=([^;]*)')||0)[2];
	type: 'GET',
	url: '/cart.js',
	dataType: 'text',
	success: function(data) {
		if (data.indexOf("subscription_id") > -1) {
			var paramDomain = 'myshopify_domain={{ shop.permanent_domain }}';
			try {
				var paramLinker = "&" + ga.getAll()[0].get('linkerParam');
			} catch (err) {
				var paramLinker = '';
			var paramCustomer = '{% if customer %}&customer_id={{ }}&customer_email={{ }}{% endif %}';
			window.location = "" + paramDomain +  paramCart + paramLinker + paramCustomer;
		} else {
			window.location = '/checkout';

The end result will look like the following (new code is highlighted for your convenience):

Still stuck? How can we help? Still stuck? How can we help?