<div id="app" class="container">
	<div style="display: flex; justify-content: center;">
		<apicart-cart-dropdown ref="cartDropdown" @footer-button-click="showCheckout"></apicart-cart-dropdown>
	</div>
	<apicart-category ref="category"></apicart-category>
	<apicart-cart-dialog ref="cartDialog"></apicart-cart-dialog>
	<apicart-checkout-dialog ref="checkoutDialog"></apicart-checkout-dialog>
	<apicart-order-dialog ref="orderDialog"></apicart-order-dialog>
</div>

<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/bundles/skeleton/skeleton.full.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/button/button.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/dialog/dialog.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/drawer/drawer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/loader/loader.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/buy-button/buy-button.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/buy-button-with-quantity/buy-button-with-quantity.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/cart-dialog/cart-dialog.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/cart-dropdown/cart-dropdown.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/products-list/products-list.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/categories-list/categories-list.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/category/category.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/payment-methods-list/payment-methods-list.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/shipping-methods-list/shipping-methods-list.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/checkout/checkout.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/checkout-dialog/checkout-dialog.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apicart/vue-components@1.0.0-alpha7/dist/components/order-dialog/order-dialog.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',
								]
							}
						}
					}
				}
			}
		});


	new Vue({
		el: '#app',
		components: {
			ApicartCartDropdown,
			ApicartCategory,
			ApicartCartDialog,
			ApicartOrderDialog,
			ApicartCheckoutDialog
		},
		methods: {
			showCheckout() {
				this.$refs.checkoutDialog.open();
			}
		}
	});
</script>

<style>
	body {
		margin: 0;
	}

	* {
		font-family: -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
		box-sizing: border-box;
	}

	.container {
		max-width: 1928px;
		padding: 0 10px;
		margin: 0 auto;
		margin-bottom: 100px;
		margin-top: 100px;
	}

</style>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.