bumbummen99 / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
505 stars 234 forks source link

Gross price description in Config/cart.php needs updating #153

Closed kokoshneta closed 2 years ago

kokoshneta commented 2 years ago

In config/cart.php, the first entry is currently this:

    /*
    |--------------------------------------------------------------------------
    | Gross price as base price
    |--------------------------------------------------------------------------
    |
    | This default value is used to select the method to calculate prices and taxes
    | If true the item price is managed as a gross price, so taxes will be calculated by separation/exclusion
    |
    */

    'calculator' => \Gloudemans\Shoppingcart\Calculation\DefaultCalculator::class,

Going through the file’s version history, I see that the gross_price boolean was refactored out into two different calculators, but the description in the config file wasn’t updated along with it, so now the description makes no sense in connection with the value it’s meant to describe.

A single description in a config file seems a bit minor for an entire pull request, but I’d suggest updating it to something like this:

    /*
    |--------------------------------------------------------------------------
    | Price and tax calculator to use
    |--------------------------------------------------------------------------
    |
    | This value is used to select the calculator used to calculate prices and
    | taxes. The DefaultCalculator treats prices as net prices and calculates
    | taxes additively. If your prices already include taxes, you can use the 
    | GrossPrice calculator instead, which will calculate prices subtractively.
    |
    */

    'calculator' => \Gloudemans\Shoppingcart\Calculation\DefaultCalculator::class
bumbummen99 commented 2 years ago

Calculators might be removed completely anyways next version with the switch to MoneyPHP

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days