Product.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <article class="product">
  3. <header>
  4. <h1 v-html="product.title"/>
  5. </header>
  6. <section class="content">
  7. <div class="description" v-html="product.body"/>
  8. <!-- <div class="price-description" v-html="product.price_description"/> -->
  9. </section>
  10. <aside v-if="!isAdherent">
  11. <div
  12. class="variation"
  13. v-for="variation in product.variations"
  14. :key="variation.id"
  15. >
  16. <div class="variation-description" v-html="variation.description"/>
  17. <button
  18. type="button"
  19. name="addtocart"
  20. @click.stop="checkaddtocart($event, variation.id)"
  21. >
  22. {{ $t("default.Add to cart") }}
  23. </button>
  24. </div>
  25. </aside>
  26. <!-- <Modal
  27. v-if="showLoginModal"
  28. @close="closeModal"
  29. :styles="{width:'500px', height:'350px'}"
  30. >
  31. <section id="pricing-modal-login-register">
  32. <h2>{{ $t("materio.Please login or create a new account") }}</h2>
  33. <LoginRegister
  34. :callbackargs="showLoginModal"
  35. @onLogedIn="onLogedIn"
  36. @onRegistered="onRegistered"
  37. />
  38. </section>
  39. </Modal> -->
  40. </article>
  41. </template>
  42. <script>
  43. // import { REST } from 'vuejs/api/rest-axios'
  44. import router from 'vuejs/route'
  45. // import { mapState, mapActions } from 'vuex'
  46. import productsMixins from 'vuejs/components/productsMixins'
  47. // import Modal from 'vuejs/components/Helper/Modal'
  48. // import LoginRegister from 'vuejs/components/Helper/LoginRegister'
  49. // let basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;
  50. export default {
  51. name: "Product",
  52. router,
  53. props: ['product'],
  54. mixins: [productsMixins],
  55. data(){
  56. return {
  57. quantity: 1,
  58. // showLoginModal:false
  59. }
  60. }
  61. // ,
  62. // methods:{
  63. // // ...mapActions({
  64. // // userLogin: 'User/userLogin'
  65. // // })
  66. // }
  67. // ,
  68. // components: {
  69. // Modal,
  70. // LoginRegister
  71. // }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. </style>