Laracart Versions Save

Laravel Shopping Cart Package

2.3.0

1 year ago

2.2.0

2 years ago

Laravel 9 Support

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1

2 years ago

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.

2.0

2 years ago

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!

1.12.0-RC-1

3 years ago

My tests are currently unable to run php 8 because of a dependency. but you can try to use as it "should" work.

1.11.0

3 years ago

#268

1.10.0

4 years ago

This should solve PHP7.4 depreciating of money_fomrat. Also it should solve windows not being able to use LaraCart at all.

BREAKING CHANGES

International Formatting

International formatting has been replaced with currency code in the config.

    /*
    |--------------------------------------------------------------------------
    | The currency code changes how you see the actual amounts.
    |--------------------------------------------------------------------------
    | This is the list of all valid currency codes
    | https://www2.1010data.com/documentationcenter/prod/1010dataReferenceManual/DataTypesAndFormats/currencyUnitCodes.html
    |
    */
    'currency_code' => 'USD',

The Format Money Function

formatMoney signature has changed

public static function formatMoney($number, $locale = null, $internationalFormat = false, $format = true)
public static function formatMoney($number, $locale = null, $currencyCode = null, $format = true)

So please look through your code and replace anytime that you are using the $internationalFormat.