Releases: lukepolo/laracart
Laravel 11 Support
Laravel 10 Support
Apply fixes from StyleCI [ci skip] [skip ci]
Laravel 9 Support
Laravel 9 Support
PHP 8.1 bug fix
2.1.3 fix copying object to use clone (#311)
Coupon rounding
Apply fixes from StyleCI [ci skip] [skip ci]
Don’t round discounts till the end
Apply fixes from StyleCI [ci skip] [skip ci]
Formatting (In Some Places) Goes Away
Rounding sucks, and most of its caused when we round too early.
To fix this I've removed most of the formatting options to LaraCart except on totals.
This fixes tons of issues and gives us better results.
Massive Update: Breaking Changes / Less Bugs / Easier to Maintain
Hey All!
I want to start off with, I'm sorry. LaraCart has been needing some love lately, as they are numerous (but minor) bugs that made some significant changes on how taxes / discounts work in tandem.
That being said, I've started on a new version of the package that should solve the broad cases of taxation / discount issues.
To Summarize what has changed:
Totals / SubTotals
The sub totals / totals / net totals were filled with passable arguments to have tax / formatting and more. This cause maintablity issues as they weren't turley sub totals in some ways.
These have been revamped to only be singular. They will only show the proper sub totals etc. If a function needed an extra param those were removed and renamed
Item / Sub Items
Price use to be the sub total and now has been converted just to be the actual price (silly of me right?) .
Taxation / Discounts
Firstly, based on the most used practice taxation happens AFTER discounts. This has become the default and currently the only way in 2.0.
The reason behind this is complicated, but to put shortly each item should be its own line item that correctly tracks it's own discount / taxation.
Items QTY's are now Line Itemed
There has been massive problems when it comes to rounding / discounts / taxation when laracart was using the sub total function with the QTY. This would lead to improper rounding and wrong taxation in some cases.
Now, each item is a line item to calculate the proper taxation / discounts etc.
Features Missing
There are some features missing (sorry...) , eventually can be put back if there was an actual need for it.
- tax_by_item (done by default now)
- tax_item_before_discount (taxes should be applied AFTER discounts in MOST cases) .. this is one that may need to go back in~
- discountTaxable (yes it was different cased....) was removed in favor of taxation happens after discounts (so discounts cant be taxed)
- discountsAlreadyTaxed refer to above
There are other changes that may not be listed here , such as signature changes. A upgrade guide will be put out before full release.
Thanks for reading if you've made it this far.
Also would like to thank
@dennisoderwald for sponsoring LaraCart!
Upgrade Guide https://github.com/lukepolo/laracart/blob/2.0/upgrade-1.0-2.0.md
--
Docs will be updated this week!
PHP 8.0
My tests are currently unable to run php 8 because of a dependency. but you can try to use as it "should" work.