silvershop / silvershop-core

SilverShop is an e-commerce shopping cart module for the SilverStripe CMS
http://silvershop.github.io
BSD 2-Clause "Simplified" License
113 stars 119 forks source link

Fix currency formatting #814

Closed wernerkrauss closed 7 months ago

wernerkrauss commented 8 months ago

somehow related to #779 some more formatting for different prices in the backend.

For formatting payments see https://github.com/silverstripe/silverstripe-omnipay/issues/244

@wilr and/or @forsdahl please have a look at this PR and merge if possible. I disabled OrderModifier's Amount() method which should be fine IMHO but could possibly break some stuff.

wilr commented 7 months ago

All checks are green so I'm happy

chromos33 commented 7 months ago

disabling the Amount method breaks the ShowInTable() function in OrderDiscountModifier in the Discount Module.

wernerkrauss commented 7 months ago

@chromos33 Thanks for reporting this. Can you please try changing OrderDiscountModifier's ShowInTable() method to:

    public function ShowInTable()
    {
        return $this->Amount > 0;
    }

so using the magic DB-Field value directly instead of the getter method