coreshop / CoreShop

CoreShop - Pimcore enhanced eCommerce
http://www.coreshop.org
Other
275 stars 157 forks source link

Error when adding payment to order #355

Closed darkbind closed 6 years ago

darkbind commented 6 years ago
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no

Hey there,

when adding a payment to an order there is an error because \CoreShop\Component\Order\Model\Order class calls the function getPayments which isn't there anymore.

Did I miss just some migration or is it a bug?

Thanks

dpfaffenbauer commented 6 years ago

What version are you on? getPayments is gone for several weeks now. can you please try update to latest dev-master?

darkbind commented 6 years ago

It should be up to date. I'm talking about this call in line 29 of \CoreShop\Component\Order\Model\Order

 foreach ($this->getPayments() as $payment) {
            if ($payment->getTotalAmount()) {
                $totalPayed += $payment->getTotalAmount();
            }
        }

I know the getPayments method isn't there for quite a time, but it's still called so I thought an extending class (-> CoreShopOrder) would implement getPayments at least but I couldn't find any migrations for that. Do I miss just something?

dpfaffenbauer commented 6 years ago

alright, found it and fixed it. thanks for reporting :)