@cartpanda/hydrogen-checkout-button
v1.0.11
Published
This is a cartpanda X hydrogen checkout button package. By using this library, you can replace Hydrogen default checkout button and redirect your customer to our (Cartpanda) checkout page.
Downloads
9
Readme
Intro
This is a cartpanda X hydrogen checkout button package. By using this library, you can replace Hydrogen default checkout button and redirect your customer to our (Cartpanda) checkout page.
How To Use
- Install the package first
npm i @cartpanda/hydrogen-checkout-button
- Adjust your shopify.config.js file
export default {
storeDomain: '',
storefrontToken: '',
storefrontApiVersion: '',
cartpandaDomain: 'example.mycartpanda.com'
};
- Import the library on your cart component
import {CheckoutButton} from "@cartpanda/hydrogen-checkout-button";
- Use the component by passing the config and cart items to props like this
const cart = useCart()
<CheckoutButton className={styles.cartCheckout} cart={cart} config={shopifyConfig}>
FINALIZAR COMPRA (CartPanda)
</CheckoutButton>