Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Show Details about Pricing Calculation of Line Items in the Cart #25

Merged
merged 3 commits into from
Dec 12, 2018

Conversation

mraerino
Copy link
Member

Fixes #15

For every line item in the cart this will add a calculation key with this payload:

{
    subtotal: 0,
    discount: 0,
    couponDiscount: 0,
    memberDiscount: 0,
    discountItems: [
        {
            type: "coupon",
            percentage: 10,
            fixed: 0
        }
    ],
    netTotal: 0,
    taxes: 0,
    total: 0,
}

The tests for the calculation have been extended to check the values for these.

@bcomnes bcomnes merged commit 8c66490 into netlify:master Dec 12, 2018
@bcomnes
Copy link
Contributor

bcomnes commented Dec 12, 2018

gocommerce-js@4.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add per line item discount to cart object
2 participants