5.0.0 • Published 6 years ago

vue-shopify-products v5.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

vue-shopify-products

Formats a Shopify CSV to be more manageable

This Vue plugin takes a shopify CSV and converts it into a more freiendly format. Combining products and adding image and product variations as arrays and objects, this plugin allows you to use Shopify test data to practice building a shop with Vue.

Installation

Include the JS in your file:

<script type="text/javascript" src="assets/js/vue-shopify-products.js"></script>

and use the plugin before you initialise Vue:

Vue.use(ShopifyProducts);

Usage

You can use this with currently two libraries

CSV Parser.

Example:

Vue.use(ShopifyProducts);

new Vue({
  mounted() {
    CSV.fetch({
      url: './data/csv-files/bicycles.csv'
    }).then(data => {
      let products = this.$formatProducts(data);

      // Do what you will
      console.log(products);
    });
  }
}).$mount('#app');

d3.

Example:

Vue.use(ShopifyProducts);

new Vue({
  mounted() {
    d3.csv('./data/csv-files/bicycles.csv', (error, data) => {
      let products = this.$formatProducts(data);

      // Do what you will
      console.log(products);
    });
  }
}).$mount('#app');
5.0.0

6 years ago

4.2.0

7 years ago

4.1.0

7 years ago

4.0.0

7 years ago

3.0.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.0

7 years ago