An open API service indexing awesome lists of open source software.

https://github.com/loevgaard/dandomainjs


https://github.com/loevgaard/dandomainjs

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

# dandomainjs - A library for making things easier on the Dandomain webshop

[![Software License][ico-license]](LICENSE)

The intention of this library is make common tasks easy to accomplish, i.e. facebook tracking, ecommerce tracking.

It includes some nice utilities also that eases your javascripting with the Dandomain platform.

## Install
Install using bower.io:
``` bash
$ bower install dandomainjs --save
```

or download the files directly from the `src` directory.

## Usage
``` html

// for full usage capabilities, run the init method with a mapping for
// your language ids to currencies
dandomainjs.init({
languageIdToCurrency: {
26: 'DKK',
27: 'SEK',
28: '...'
}
});

```

In the code field for order step 4 in the Dandomain admin, insert these tags:
``` html

[[OrderID]]

[[AdWordsSubTotalInclVAT]]

[[AdWordsSubTotalExclVAT]]

[[ShippingFeeInclVAT]]

[[ShippingFeeExclVAT]]

```

## Testing
We use QUnit for unit testing. You can run the tests by opening the html files in the `tests` folder.

You are more than welcome to add more tests.

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square