This article will explain how to retrieve and configure the code necessary to establish the Shopify Checkout Redirect.
Note |
---|
This article should only be followed if you are building custom php websites outside of the CheckoutChamp funnel builder. If you are using the CheckoutChamp funnel builder, please follow this article instead: Shopify Checkout Redirect - Standard Cart |
External Checkout (Direct API) Configuration
To process your Shopify cart on an external checkout page, the checkout page must be connected to the CRM API. See here for API documentation.
...
To redirect the Shopify cart to the checkout page, it is required to manually set the routing on your Shopify cart page.
How to use
If you are unfamiliar with accessing your Shopify Liquid Code please follow the instructional video here
Go to the snippets/ folder and add a "your-cart.js.liquid" snippet.
Go here. Copy all of the code and paste into the your-cart.js.liquid snippet. Save the snippet.
Replace the text you.must.define.a.checkout.url with the URL of your CRM checkout page.
Go to the cart.liquid file and paste this text at the top of the file.
Code Block {% include 'your-cart.js' with cart: cart %}
Save the cart.liquid file.
Checkout URLs that Contain "?"
If your checkout page URL contains a"?" follow these steps to ensure the checkout redirect works:
Look at this sample checkout URL: https://wordpresskonnekt.online/?page_id=304, notice it contains a"?"
Navigate to your cart.liquid file and edit checkout_url to exclude the question mark and what follows it. Save.
Code Block Before: checkout_url:'https://wordpresskonnekt.online/?page_id=304' After: checkout_url:'https://wordpresskonnekt.online/'
Go to the konnektive-cart.js.liquid snippet. Find this line near the bottom.
Code Block return self.options.checkoutUrl + '?products=' + urlLineItems;
Replace the ? with &, and prepend the part that was taken out of the original checkout url (?page_id=304).
Code Block return self.options.checkoutUrl + '?page_id=304&products=' + urlLineItems;
Save the snippet.