# adwise-m2storefront

> ## Implementation in existing storefront

Latest version **1.0.6** (published 2019-06-26) · 0 weekly downloads

## Install

```sh
npm install adwise-m2storefront
pnpm add adwise-m2storefront
yarn add adwise-m2storefront
bun add adwise-m2storefront
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-06-26 |
| First published | 2019-06-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | adwise |

## Links

- npm: https://www.npmjs.com/package/adwise-m2storefront
- npm.io page: https://npm.io/package/adwise-m2storefront

## Dependencies (7)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [vuex](https://npm.io/package/vuex.md) ^3.1.0
- [axios](https://npm.io/package/axios.md) ^0.19.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [core-js](https://npm.io/package/core-js.md) ^2.6.5
- [vue-i18n](https://npm.io/package/vue-i18n.md) ^8.11.2
- [vuex-persist](https://npm.io/package/vuex-persist.md) ^2.0.0

## Recent versions

- 1.0.6 (latest) — 2019-06-26
- 1.0.5 — 2019-06-05
- 1.0.4 — 2019-06-05
- 1.0.3 — 2019-06-05
- 1.0.2 — 2019-06-04
- 1.0.1 — 2019-06-04
- 1.0.0 — 2019-06-04

## README

# adwise-m2storefront

## Implementation in existing storefront

```npm install adwise-m2storefront```

Configure the implementation. Place the configuration as low in the body as possible.
```
<script type="text/javascript">
      var APP_SETTINGS = {
        checkout_url: 'https://checkout.test/checkout/onestepcheckout/', // URL to the checkout
        cart_url: 'https://checkout.test/cart/', // URL to the cart (used in minicart)
        locale: 'nl', // locale used for formatting prices
        language: 'nl', // default language the app is loaded in
        vat_rate: 0.21, // float value of tax
        api: {
          base_url: 'https://checkout.test/rest/V1/', // Magento API entry
          bearer_token: 'qvn8jsd1qf4qkpwfi9hsefnupwhaa14r' // Magento API authorization token
        },
        messages: [] // Array of predefined messages to show format: { text: 'Your message', type: 'error' }
      }
    </script>
```

Include source files in template.
Should be inserted after defining APP_SETTINGS.
```
node_modules/adwise-m2storefront/dist/js/vendors.js
node_modules/adwise-m2storefront/dist/js/apps.js
```

#####Minicart 
```
<div id="vue-minicart"></div>
```
#####Cart
```
<div id="vue-cart"></div>
```
#####Notifications (*multiple instances on page allowed*)
```
<div class="vue-notifications"></div>
```
#####Add to cart (*multiple instances on page allowed*)
```
<div class="vue-add-to-cart" data-sku="[[PRODUCT SKU]]"></div>
```

## Project development setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

---
_Source: https://npm.io/package/adwise-m2storefront · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
