Skip to content

Instantly share code, notes, and snippets.

@p4tin
Forked from Machy8/index.html
Created March 25, 2020 11:39
Show Gist options
  • Save p4tin/7fada6545845d3996d62a297ffc1e0a5 to your computer and use it in GitHub Desktop.
Save p4tin/7fada6545845d3996d62a297ffc1e0a5 to your computer and use it in GitHub Desktop.
Apicart - minimum configuration - https://apicart.net
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Apicart vue bundle example">
<title>Vue default bundle example</title>
</head>
<body>
<!-- You can use custom layout. This is just for the example -->
<div style="max-width: 1902px; margin: 0 auto; padding: 0 20px;">
<header style="margin: 50px 0; display: flex; justify-content: center;">
<!-- #apicart-cart-dropdown is the target element for the Cart dropdown component. You can move it wherever you want -->
<div id="apicart-cart-dropdown"></div>
</header>
<main>
<!-- #apicart is the target for the application -->
<div id="apicart"></div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/gh/apicart/packages-js@master/packages/vue-components/dist/bundles/default/default.full.min.js"></script>
<script>
Apicart
.setDevEnv()
.configure({
// Replace tokens with your PUBLIC tokens from the administration
store: new Apicart.Store({ token: "9mCu3DlBCa4REI?Q7kKly!Rw6!_FvD8K_dgPXe1b20?r6!sPTQMyCpq_ADt!jXOD" }),
payments: new Apicart.Payments({ token: 'Q84lNQyLl?nBGvKxxbcdc!nWFKEZrK?L_Is2r9IaOJo14ONbXw1SMlPIeptcaFza' }),
vueComponents: {
category: {
products: {
list: [
// Replace tokens with your PUBLIC tokens from the administration
"https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/04/4.json",
"https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/03/3.json",
"https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/02/2.json",
"https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/01/1.json"
]
}
}
}
})
.initVueBundle();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment