https://github.com/loevgaard/dandomainjs
https://github.com/loevgaard/dandomainjs
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/loevgaard/dandomainjs
- Owner: loevgaard
- License: mit
- Created: 2017-05-01T11:27:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-10T07:29:48.000Z (about 8 years ago)
- Last Synced: 2025-03-13T12:05:53.146Z (about 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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