Skip to content

Instantly share code, notes, and snippets.

@Machy8
Last active March 7, 2020 18:17
Show Gist options
  • Save Machy8/b2a34982ddeff6abd9b6e7447261ce5a to your computer and use it in GitHub Desktop.
Save Machy8/b2a34982ddeff6abd9b6e7447261ce5a to your computer and use it in GitHub Desktop.
Apicart full 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>
<div style="max-width: 1902px; margin: 0 auto; padding: 0 20px;">
<header style="margin: 50px 0; display: flex; justify-content: center;">
<div id="apicart-cart-dropdown"></div>
</header>
<main>
<div id="apicart"></div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/gh/apicart/packages-js@1.0.0-alpha3/packages/vue-components/dist/bundles/default/default.full.min.js"></script>
<script>
Apicart
.setDevEnv()
.configure({
store: new Apicart.Store({ token: '9mCu3DlBCa4REI?Q7kKly!Rw6!_FvD8K_dgPXe1b20?r6!sPTQMyCpq_ADt!jXOD' }),
payments: new Apicart.Payments({ token: 'Q84lNQyLl?nBGvKxxbcdc!nWFKEZrK?L_Is2r9IaOJo14ONbXw1SMlPIeptcaFza' }),
vueComponentsTranslator: {
currencyFormats: {
en: {
currency: {
currency: 'USD'
}
}
},
localization: {
en: {
categories: {
clothes: {
title: 'The most beautiful clothes',
description: "The most beautiful t-shirts.",
menu: 'T-shirts',
new: {
title: 'New collection',
description: "T-shirts from our new collection.",
menu: 'New collection'
},
discount: {
title: 'Discounted t-shirts',
description: "The most popular T-shirts for half price",
menu: 'Discount'
}
}
}
}
}
},
vueComponents: {
category: {
products: {
list: {
clothes: {
new: [
'https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/01/1.json',
'https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/02/2.json',
'https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/03/3.json',
'https://cdn.apicart.dev/external/wlhv1egho2u4p0e0nkne2mks7f9btigi/data/04/4.json',
],
discount: [
'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