Using WooCommerce Catalog with Checkout Page
Last updated
Last updated
To make a WooCommerce catalog page work with a CheckoutChamp shopping cart, you will add links to your checkout page Add To Cart buttons. The links will have the productId parameter in the query string equal to the desired CheckoutChamp campaign product ID.
Examples:
a link
a button img
The link will take you to the checkout page with that product added to the shopping cart with quantity 1.
This method is intended to be used with a separate checkout page than your WooCommerce checkout page.
You’ll need to add this script to the page parse the input and cache the products into the product array-
When making the Import Order API call, parse myCart into product{i}_id, product{i}_qty, and variant{i}_id (if applicable). Increment {i} for each product, starting with 1.