Recharge / Shopify Ajax Add to Cart Code Generator Tool 


If you're not sure how to use this tool, please read How To Automatically add a product to cart using Ajax with Recharge and Shopify.
This tool helps you generate the necessary scripts on your backend so you can allow users to add products to their cart via Ajax. This is a 2 part code. Step 1 is generating your variant URL and step 2 is generating your button codes. 

This has been tested on a ReCharge and Shopify site. But, this hasn't been tested on just Shopify alone. It's possible it could work on just Shopify, but you will need to modify the checkout URL. There are several code snippets that MUST be added to your core files before (either on the theme or side loaded) BEFORE this can work for you. Refer to the link above. The data and forms of this generator tool are not stored. If you refresh your page, you'll lose your code.

Step 1: Generate Your Variant URL

Fill in the fields and then click on the "Generate" button. Find your product ID and input in the field below. The generated URL should look like this: "https://yourstore.myshopify.com/admin/products/[productID].xml" From there, click the link and find your variant ID.

Once your variant URL is generated, copy and paste in a new tab. 

Step 2: Generate Your HTML Button Codes

Enter your newly discovered variant ID(s) into the below forms. Frequency of "1" represents recurring every 1 "unit". In this case 1 month. 0 Means a singular product or straight sell. If you select frequency "1" make sure you select "month". If you select frequency "0", make sure you select unit "single". You can include as many variants as you'd like the user to add to cart with a single button click! This enables you to add more than one product to each cart and mix and match subscription (ReCharge) and non subscription (Shopify) products all in one single click! 

Once you click "Generate" your button code will be generated, just copy/paste that into a page on your store. This should work with most themes!

Unlock Step 2 Right Now

Being an Insider has its perks. Just provide your email so we can send you amazing content that makes you money. 

>