Wednesday, 4 July, 2018 UTC


Summary

This tutorial is part of the ยซ Cooking a Deliveroo clone with Nuxt (Vue.js), GraphQL, Strapi and Stripe ยป:
  • ๐Ÿ‘‹ Intro
  • ๐Ÿ—๏ธ Setup (part 1)
  • ๐Ÿ  Restaurants (part 2)
  • ๐Ÿ” Dishes (part 3)
  • ๐Ÿ” Authentication (part 4)
  • ๐Ÿ›’ Shopping Card (part 5) - current
  • ๐Ÿ’ต Order and Checkout (part 6)
  • ๐Ÿš€ Bonus: Deploy (part 7)
  • ๐Ÿ‘ Conclusion
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?
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.