duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

[6.x] Fix error with `{{ sc:cart:raw_tax_total_split }}` tag #1037

Closed duncanmcclean closed 6 months ago

duncanmcclean commented 6 months ago

This pull request fixes an error when using the {{ sc:cart:raw_tax_total_split }} tag.

Previously, the raw_tax_total_split tag was getting the line items from the tag's ->items() method which meant it was getting the line items post-augmentation.

This would then cause an issue when trying to sum the tax totals because the tax amounts would be augmented as strings (eg. £12.50) instead of integers.

This refactors that implementation so we're dealing with the LineItem methods, rather than augmented arrays.

Related: https://github.com/duncanmcclean/simple-commerce/issues/1035#issuecomment-2018270684

github-actions[bot] commented 6 months ago

Released as part of v6.0.11.