1.0.1 • Published 3 years ago

digitalsterne-cart-divider v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Digitalsterne Cart Divider

This library provides a basic functionality to group your products after purchase into comission groups which can be sent as parameters to different networks.

Usage

You can initialize a new Divider class by calling

Params

You can provide multiple parameters when initializing a new instance:

Options:

The products array must reference the specifications mentioned in the official Google documentation: Official Google Documentation

Example

Without callback function

With callback function

Returned result

The Divider will return two variables:

1 OBJECT holding all comission groups and the calculated values 2 OBJECT holding all product ids and their respective comission group