Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculate cartline unit price based on cart user, rather than Auth::user #897

Merged
merged 9 commits into from
Mar 24, 2023
Merged

calculate cartline unit price based on cart user, rather than Auth::user #897

merged 9 commits into from
Mar 24, 2023

Conversation

kylekanderson
Copy link
Contributor

Currently, the GetUnitPrice class that's used to calculate CartLine unit prices in the Cart Pipeline relies on Auth::user() to fetch the CustomerGroups used to calculate the CartLine's pricing.

However, there are instances where Auth::user() would not yield the correct CustomerGroups that apply to the cart (when running a queued job, for example), as there is no current authenticated user in that context.

Instead, this Pull Request relies on the cart's user to get the applicable CustomerGroups.

alecritson and others added 8 commits February 10, 2023 13:27
commit 02c2671
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 11:13:49 2023 +0000

    Update lines.blade.php (#849)

commit 0780a1c
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 18:41:36 2023 +0800

    Update CollectionTree.php (#835)

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit e558799
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:16 2023 +0000

    :beer:

commit 8fd4842
Merge: df6f7f7 51af420
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:03 2023 +0000

    Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

commit df6f7f7
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:00 2023 +0000

    :beer:

commit 51af420
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 17:43:10 2023 +0800

    [0.2] Hotfix - fix pluck on null (#834)

    * fix pluck on null

    * Update AbstractDiscount.php

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 7b5ce85
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 17:16:50 2023 +0800

    [0.2] Fix/discount by product (#841)

    * fix

    * add test

    * fix discount minSpend precision

    * fix discount condition logic

    * fix

    * fix coupon check

commit 72f8454
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:16:16 2023 +0000

    Hotfix [0.2] - Wrap customer group in array (#846)

    * Wrap customer group in array

    * Update ProductVariantTest.php

commit b8773d3
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Wed Feb 8 20:43:09 2023 +0000

    When DB::table() is used make sure connection is passed (#826)

commit 650d9db
Merge: dcd39cc de20aff
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Wed Feb 1 09:57:04 2023 +0000

    Merge branch 'main' into 0.2

commit dcd39cc
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Jan 31 07:29:15 2023 +0000

    :beer:
commit 1a362cc
Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
Date:   Tue Feb 14 13:25:25 2023 +0200

    Fix validation of attributes of type TranslatedText (#839)

    * fix: validation rules to be applied on elements in `TranslatedText`

    * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

    * chore: add tests for validating attribute fields (required/optional) and their additional rules

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 6c1ab08
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Feb 14 10:58:15 2023 +0000

    [0.2] Hotfix - Fix collection name on creation (#852)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Check for attribute type when creating

commit 0942397
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Feb 14 10:57:37 2023 +0000

    Update HasImages.php (#853)
* Update changelogs

* Update CHANGELOG.md
* Allow textarea component maxlength to be overridden

* Add changelog
@vercel
Copy link

vercel bot commented Mar 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 24, 2023 at 11:10AM (UTC)

alecritson
alecritson previously approved these changes Mar 20, 2023
@alecritson
Copy link
Collaborator

Thanks @kylekanderson I think this would be useful in 0.2, can we target that branch please.

@kylekanderson kylekanderson changed the base branch from main to 0.2 March 20, 2023 13:44
@kylekanderson kylekanderson dismissed alecritson’s stale review March 20, 2023 13:44

The base branch was changed.

@kylekanderson
Copy link
Contributor Author

Thanks @kylekanderson I think this would be useful in 0.2, can we target that branch please.

Sure thing. I just updated this to target 0.2.

@glennjacobs
Copy link
Contributor

@alecritson I'm happy with this, can you sort the merge conflict and merge?

@alecritson alecritson enabled auto-merge (squash) March 24, 2023 11:09
@alecritson alecritson merged commit a599243 into lunarphp:0.2 Mar 24, 2023
alecritson added a commit that referenced this pull request Mar 24, 2023
commit 6f28e8d
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 24 13:41:56 2023 +0000

    Add max user uses to discounts (#892)

    * Add ability to limit discount uses by users

    * Pint

    * Wrong relation

    * Use $cart->user instead of auth

    * Fix test bug

    * Fix test bugs

    * Change field type

    * Bug fixes

commit aff3916
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:49:43 2023 +0800

    Cart meta cast (#895)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * Update Cart.php

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>

commit b6a6a8c
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:22:15 2023 +0000

    Add `wire:ignore` to bulk actions list (#888)

commit 76471db
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:21:51 2023 +0800

    clear cached properties on model refresh (#896)

    * Update Cart.php

    * Update CachesProperties.php

    * Update Cart.php

    ---------

    Co-authored-by: Glenn Jacobs <glenn@neondigital.co.uk>

commit d9ca112
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:13:50 2023 +0000

    Tweak discount logic (#894)

commit a599243
Author: Kyle Anderson <kylekanderson@gmail.com>
Date:   Fri Mar 24 07:09:59 2023 -0400

    calculate cartline unit price based on cart user, rather than Auth::user (#897)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * calculate cartline unit price based on cart user, rather than Auth::user

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
    Co-authored-by: Kyle Anderson <kyle@creative2.com>

commit 680f317
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 13:40:38 2023 +0000

    Discount breakdown (#884)

    * Add concept of DiscountBreakdown to cart

    * Should have been $rewardLine

    * Bug fix

    * Use a DTO for affected discount lines

    * Line not lines

    * Fix bug

    * Simplify DTOs

    * Apply to `AmountOff` discounts

    * Add discount breakdown to orders

    * 🍺

    * Bug fix

    * Fix up casting... if its not a collection then we dont need to do anything

    * Make discount_breakdown nullable

    * Create method in abstract class for adding breakdowns

    * Tests

    * Place column before discount_total

    * Remove un-used code

    * Use toJson()

    * Avoid duplication in CreateOrder

    * Formatting

    * Add test to ensure discount_breakdown is added to orders

    * Add docs

    * Add changelog

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit e799ab1
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 09:39:06 2023 +0000

    Fix tax breakdown on save (#887)

    * Tax breakdown fix - if total is a price then save its value

    * Implement `SerializesCastableAttributes`

    * Add full param list

    * Update test coverage

    * Use toJson()

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 86a509c
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Thu Mar 9 15:06:15 2023 +0000

    Add shipping tax correctly (#889)

commit be5c400
Author: Glenn Jacobs <glenn@neondigital.co.uk>
Date:   Thu Feb 23 10:36:54 2023 +0000

    Adding Validations menu item which was missing
alecritson added a commit that referenced this pull request Mar 24, 2023
commit 7c9c9c2
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 14:18:08 2023 +0000

    Update changelogs (#900)

commit 04a1887
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 13:51:29 2023 +0000

    :beer:

commit 6f28e8d
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 24 13:41:56 2023 +0000

    Add max user uses to discounts (#892)

    * Add ability to limit discount uses by users

    * Pint

    * Wrong relation

    * Use $cart->user instead of auth

    * Fix test bug

    * Fix test bugs

    * Change field type

    * Bug fixes

commit aff3916
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:49:43 2023 +0800

    Cart meta cast (#895)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * Update Cart.php

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>

commit b6a6a8c
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:22:15 2023 +0000

    Add `wire:ignore` to bulk actions list (#888)

commit 76471db
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:21:51 2023 +0800

    clear cached properties on model refresh (#896)

    * Update Cart.php

    * Update CachesProperties.php

    * Update Cart.php

    ---------

    Co-authored-by: Glenn Jacobs <glenn@neondigital.co.uk>

commit d9ca112
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:13:50 2023 +0000

    Tweak discount logic (#894)

commit a599243
Author: Kyle Anderson <kylekanderson@gmail.com>
Date:   Fri Mar 24 07:09:59 2023 -0400

    calculate cartline unit price based on cart user, rather than Auth::user (#897)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * calculate cartline unit price based on cart user, rather than Auth::user

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
    Co-authored-by: Kyle Anderson <kyle@creative2.com>

commit 680f317
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 13:40:38 2023 +0000

    Discount breakdown (#884)

    * Add concept of DiscountBreakdown to cart

    * Should have been $rewardLine

    * Bug fix

    * Use a DTO for affected discount lines

    * Line not lines

    * Fix bug

    * Simplify DTOs

    * Apply to `AmountOff` discounts

    * Add discount breakdown to orders

    * 🍺

    * Bug fix

    * Fix up casting... if its not a collection then we dont need to do anything

    * Make discount_breakdown nullable

    * Create method in abstract class for adding breakdowns

    * Tests

    * Place column before discount_total

    * Remove un-used code

    * Use toJson()

    * Avoid duplication in CreateOrder

    * Formatting

    * Add test to ensure discount_breakdown is added to orders

    * Add docs

    * Add changelog

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit e799ab1
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 09:39:06 2023 +0000

    Fix tax breakdown on save (#887)

    * Tax breakdown fix - if total is a price then save its value

    * Implement `SerializesCastableAttributes`

    * Add full param list

    * Update test coverage

    * Use toJson()

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 86a509c
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Thu Mar 9 15:06:15 2023 +0000

    Add shipping tax correctly (#889)

commit be5c400
Author: Glenn Jacobs <glenn@neondigital.co.uk>
Date:   Thu Feb 23 10:36:54 2023 +0000

    Adding Validations menu item which was missing
alecritson added a commit that referenced this pull request Mar 29, 2023
commit cc1e099
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Wed Mar 29 12:19:37 2023 +0100

    Update CHANGELOG.md

commit 48e1820
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Wed Mar 29 12:14:55 2023 +0100

    Update CalculateTax.php (#905)

commit a25ae05
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Mon Mar 27 14:49:32 2023 +0100

    Update split_packages.yml

commit 7c9c9c2
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 14:18:08 2023 +0000

    Update changelogs (#900)

commit 04a1887
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 13:51:29 2023 +0000

    :beer:

commit 6f28e8d
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 24 13:41:56 2023 +0000

    Add max user uses to discounts (#892)

    * Add ability to limit discount uses by users

    * Pint

    * Wrong relation

    * Use $cart->user instead of auth

    * Fix test bug

    * Fix test bugs

    * Change field type

    * Bug fixes

commit aff3916
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:49:43 2023 +0800

    Cart meta cast (#895)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * Update Cart.php

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>

commit b6a6a8c
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:22:15 2023 +0000

    Add `wire:ignore` to bulk actions list (#888)

commit 76471db
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Mar 24 19:21:51 2023 +0800

    clear cached properties on model refresh (#896)

    * Update Cart.php

    * Update CachesProperties.php

    * Update Cart.php

    ---------

    Co-authored-by: Glenn Jacobs <glenn@neondigital.co.uk>

commit d9ca112
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Mar 24 11:13:50 2023 +0000

    Tweak discount logic (#894)

commit a599243
Author: Kyle Anderson <kylekanderson@gmail.com>
Date:   Fri Mar 24 07:09:59 2023 -0400

    calculate cartline unit price based on cart user, rather than Auth::user (#897)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Squashed commit of the following:

    commit 1a362cc
    Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
    Date:   Tue Feb 14 13:25:25 2023 +0200

        Fix validation of attributes of type TranslatedText (#839)

        * fix: validation rules to be applied on elements in `TranslatedText`

        * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

        * chore: add tests for validating attribute fields (required/optional) and their additional rules

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 6c1ab08
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:58:15 2023 +0000

        [0.2] Hotfix - Fix collection name on creation (#852)

        * Squashed commit of the following:

        commit 02c2671
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 11:13:49 2023 +0000

            Update lines.blade.php (#849)

        commit 0780a1c
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 18:41:36 2023 +0800

            Update CollectionTree.php (#835)

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit e558799
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:16 2023 +0000

            :beer:

        commit 8fd4842
        Merge: df6f7f7 51af420
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:03 2023 +0000

            Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

        commit df6f7f7
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:47:00 2023 +0000

            :beer:

        commit 51af420
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:43:10 2023 +0800

            [0.2] Hotfix - fix pluck on null (#834)

            * fix pluck on null

            * Update AbstractDiscount.php

            ---------

            Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

        commit 7b5ce85
        Author: wychoong <67364036+wychoong@users.noreply.github.com>
        Date:   Fri Feb 10 17:16:50 2023 +0800

            [0.2] Fix/discount by product (#841)

            * fix

            * add test

            * fix discount minSpend precision

            * fix discount condition logic

            * fix

            * fix coupon check

        commit 72f8454
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Fri Feb 10 09:16:16 2023 +0000

            Hotfix [0.2] - Wrap customer group in array (#846)

            * Wrap customer group in array

            * Update ProductVariantTest.php

        commit b8773d3
        Author: Ryan Mitchell <ryan@thoughtcollective.com>
        Date:   Wed Feb 8 20:43:09 2023 +0000

            When DB::table() is used make sure connection is passed (#826)

        commit 650d9db
        Merge: dcd39cc de20aff
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Wed Feb 1 09:57:04 2023 +0000

            Merge branch 'main' into 0.2

        commit dcd39cc
        Author: Alec Ritson <hello@itsalec.co.uk>
        Date:   Tue Jan 31 07:29:15 2023 +0000

            :beer:

        * Check for attribute type when creating

    commit 0942397
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Feb 14 10:57:37 2023 +0000

        Update HasImages.php (#853)

    * Release 0.2-rc2 (#873)

    * Update changelogs

    * Update CHANGELOG.md

    * Allow textarea component maxlength to be overridden (#880)

    * Allow textarea component maxlength to be overridden

    * Add changelog

    * calculate cartline unit price based on cart user, rather than Auth::user

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
    Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
    Co-authored-by: Kyle Anderson <kyle@creative2.com>

commit 680f317
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 13:40:38 2023 +0000

    Discount breakdown (#884)

    * Add concept of DiscountBreakdown to cart

    * Should have been $rewardLine

    * Bug fix

    * Use a DTO for affected discount lines

    * Line not lines

    * Fix bug

    * Simplify DTOs

    * Apply to `AmountOff` discounts

    * Add discount breakdown to orders

    * 🍺

    * Bug fix

    * Fix up casting... if its not a collection then we dont need to do anything

    * Make discount_breakdown nullable

    * Create method in abstract class for adding breakdowns

    * Tests

    * Place column before discount_total

    * Remove un-used code

    * Use toJson()

    * Avoid duplication in CreateOrder

    * Formatting

    * Add test to ensure discount_breakdown is added to orders

    * Add docs

    * Add changelog

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit e799ab1
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Fri Mar 10 09:39:06 2023 +0000

    Fix tax breakdown on save (#887)

    * Tax breakdown fix - if total is a price then save its value

    * Implement `SerializesCastableAttributes`

    * Add full param list

    * Update test coverage

    * Use toJson()

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 86a509c
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Thu Mar 9 15:06:15 2023 +0000

    Add shipping tax correctly (#889)

commit be5c400
Author: Glenn Jacobs <glenn@neondigital.co.uk>
Date:   Thu Feb 23 10:36:54 2023 +0000

    Adding Validations menu item which was missing
wychoong pushed a commit to wychoong/lunar that referenced this pull request May 24, 2023
…ser (lunarphp#897)

* Squashed commit of the following:

commit 02c2671
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 11:13:49 2023 +0000

    Update lines.blade.php (lunarphp#849)

commit 0780a1c
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 18:41:36 2023 +0800

    Update CollectionTree.php (lunarphp#835)

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit e558799
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:16 2023 +0000

    :beer:

commit 8fd4842
Merge: df6f7f7 51af420
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:03 2023 +0000

    Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

commit df6f7f7
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:47:00 2023 +0000

    :beer:

commit 51af420
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 17:43:10 2023 +0800

    [0.2] Hotfix - fix pluck on null (lunarphp#834)

    * fix pluck on null

    * Update AbstractDiscount.php

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 7b5ce85
Author: wychoong <67364036+wychoong@users.noreply.github.com>
Date:   Fri Feb 10 17:16:50 2023 +0800

    [0.2] Fix/discount by product (lunarphp#841)

    * fix

    * add test

    * fix discount minSpend precision

    * fix discount condition logic

    * fix

    * fix coupon check

commit 72f8454
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Fri Feb 10 09:16:16 2023 +0000

    Hotfix [0.2] - Wrap customer group in array (lunarphp#846)

    * Wrap customer group in array

    * Update ProductVariantTest.php

commit b8773d3
Author: Ryan Mitchell <ryan@thoughtcollective.com>
Date:   Wed Feb 8 20:43:09 2023 +0000

    When DB::table() is used make sure connection is passed (lunarphp#826)

commit 650d9db
Merge: dcd39cc de20aff
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Wed Feb 1 09:57:04 2023 +0000

    Merge branch 'main' into 0.2

commit dcd39cc
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Jan 31 07:29:15 2023 +0000

    :beer:

* Squashed commit of the following:

commit 1a362cc
Author: Ivanka Todorova <1038697+fakeheal@users.noreply.github.com>
Date:   Tue Feb 14 13:25:25 2023 +0200

    Fix validation of attributes of type TranslatedText (lunarphp#839)

    * fix: validation rules to be applied on elements in `TranslatedText`

    * fix: "reset" the validation rules applied to each sub-field in `TranslatedText`

    * chore: add tests for validating attribute fields (required/optional) and their additional rules

    ---------

    Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

commit 6c1ab08
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Feb 14 10:58:15 2023 +0000

    [0.2] Hotfix - Fix collection name on creation (lunarphp#852)

    * Squashed commit of the following:

    commit 02c2671
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 11:13:49 2023 +0000

        Update lines.blade.php (lunarphp#849)

    commit 0780a1c
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 18:41:36 2023 +0800

        Update CollectionTree.php (lunarphp#835)

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit e558799
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:16 2023 +0000

        :beer:

    commit 8fd4842
    Merge: df6f7f7 51af420
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:03 2023 +0000

        Merge branch '0.2' of github.com:lunarphp/lunar into 0.2

    commit df6f7f7
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:47:00 2023 +0000

        :beer:

    commit 51af420
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:43:10 2023 +0800

        [0.2] Hotfix - fix pluck on null (lunarphp#834)

        * fix pluck on null

        * Update AbstractDiscount.php

        ---------

        Co-authored-by: Alec Ritson <hello@itsalec.co.uk>

    commit 7b5ce85
    Author: wychoong <67364036+wychoong@users.noreply.github.com>
    Date:   Fri Feb 10 17:16:50 2023 +0800

        [0.2] Fix/discount by product (lunarphp#841)

        * fix

        * add test

        * fix discount minSpend precision

        * fix discount condition logic

        * fix

        * fix coupon check

    commit 72f8454
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Fri Feb 10 09:16:16 2023 +0000

        Hotfix [0.2] - Wrap customer group in array (lunarphp#846)

        * Wrap customer group in array

        * Update ProductVariantTest.php

    commit b8773d3
    Author: Ryan Mitchell <ryan@thoughtcollective.com>
    Date:   Wed Feb 8 20:43:09 2023 +0000

        When DB::table() is used make sure connection is passed (lunarphp#826)

    commit 650d9db
    Merge: dcd39cc de20aff
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Wed Feb 1 09:57:04 2023 +0000

        Merge branch 'main' into 0.2

    commit dcd39cc
    Author: Alec Ritson <hello@itsalec.co.uk>
    Date:   Tue Jan 31 07:29:15 2023 +0000

        :beer:

    * Check for attribute type when creating

commit 0942397
Author: Alec Ritson <hello@itsalec.co.uk>
Date:   Tue Feb 14 10:57:37 2023 +0000

    Update HasImages.php (lunarphp#853)

* Release 0.2-rc2 (lunarphp#873)

* Update changelogs

* Update CHANGELOG.md

* Allow textarea component maxlength to be overridden (lunarphp#880)

* Allow textarea component maxlength to be overridden

* Add changelog

* calculate cartline unit price based on cart user, rather than Auth::user

---------

Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
Co-authored-by: Kyle Anderson <kyle@creative2.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants