1.0.25 • Published 6 years ago

vuex-magento-bridge v1.0.25

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Magento Store Vuex

Enpoints of Magento bridge for Vuex

Usage

import { category } from 'vuex-magento-bridge'

const Category = category(URL, KEY, TIMEOUT)

export default Category

// ...
// in component
import { mixin } from 'vuex-magento-bridge'

export default {
  mixins: [
    mixin('Category')
  ],
  mounted () {
    this.searchAll() // get and store in state 'all'
    this.searchAll({ mutation: 'SET_LIST' }) // get and store in state 'list'
    this.searchAll({ mutation: 'SET_ALL', page: 1, pagesize: 10}) // get page 1 with 10 products and store in state 'all'
    this.searchAll({ mutation: 'SET_ALL', page: 1, pagesize: 10, shuf: true}) // get page 1 with 10 products, suffle and store in state 'all'
  }
}

Globals actions

  • searchAll: function ({mutation = 'SET_ALL', page = 0, pagesize = 0, shuffle = false})

Globals mutations

  • SET_ALL: function (list)

Globals getters

  • getAll: function ()

Globals modules state

  • all: Array []
1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago