HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/resources/js/components/vue/cart/cartLink.vue
<template>
    <a class="c-nav__link " :href="checkout.cartRoute" data-test="cart">{{ trans('shop/cart').cart }} ({{ checkout.totalItemsCount }})</a>
</template>

<script>
    import { mapGetters, mapState } from "vuex";

    export default {
        components: {
        },
        computed: {
            ...mapGetters({
                trans: "g11n/translation/translation" //Maps the getter function "translation" in vuex module g11n.js to a computed property called trans in this component
            }),
            ...mapState({
                checkout: "checkout", //Maps the state of the "checkout" vuex module to the computed property "checkout" on this component
            })
        },
        created() {
            this.$store.dispatch('g11n/translation/loadTranslations', [{ key: 'shop/cart' }]);
            this.$store.dispatch('checkout/loadCheckoutInformation');
        }
    };
</script>