🍝 Cooking a Deliveroo clone with Nuxt (Vue.js), GraphQL, Strapi and Stripe - πŸ›’ Shopping card (part 5/7)

Tutorial illustration

This tutorial is part of the Β« Cooking a Deliveroo clone with Nuxt (Vue.js), GraphQL, Strapi and Stripe Β»:

Note: the source code is available on GitHub: https://github.com/strapi/strapi-examples/tree/master/nuxt-strapi-deliveroo-clone-tutorial.

πŸ›’ Shopping card

All of these dishes look so tasty! What if we could add some of them in a shopping card?

Shopping card

First, we create a new store named card:

Path: store/card.js

To make sure the items stay in the card across tabs and after page reload, we are also using the cookies. So we also need to update the nuxtInitServer function:

Path: store/index.js

Path: pages/restaurants/_id.vue

Good job!

πŸ’΅ In the next section, you will learn how to setup Stripe for checkout and create orders: https://blog.strapi.io/cooking-a-deliveroo-clone-with-nuxt-vue-js-graphql-strapi-and-stripe-order-and-checkout-part-6-7.