Jump to content

Wirepayment module bug ?


Recommended Posts

Prestashop version : 1.7.8.0
Module version : 2.1.0

Bug decription
On a wire payment order, on the confirmation page the value in the amount row is always 0.

On the ps_wirepayment.php module file at line 232 

            $totalToPaid = $params['order']->getOrdersTotalPaid() - $params['order']->getTotalPaid();
            $this->smarty->assign(array(
                'shop_name' => $this->context->shop->name,
                'total' => Tools::displayPrice(
                    $totalToPaid,
                    new Currency($params['order']->id_currency),
                    false
                ),
                'bankwireDetails' => $bankwireDetails,
                'bankwireAddress' => $bankwireAddress,
                'bankwireOwner' => $bankwireOwner,
                'status' => 'ok',
                'reference' => $params['order']->reference,
                'contact_url' => $this->context->link->getPageLink('contact', true)
            ));

$totalToPaid is calculated like : $params['order']->getOrdersTotalPaid() - $params['order']->getTotalPaid() but it retrurns 0.

Editing the 'total' calculation like that is showing the right amount.

            $totalToPaid = $params['order']->getOrdersTotalPaid() - $params['order']->getTotalPaid();
            $this->smarty->assign(array(
                'shop_name' => $this->context->shop->name,
                'total' => Tools::displayPrice(
                    $params['order']->getTotalPaid(),
                    new Currency($params['order']->id_currency),
                    false
                ),
                'bankwireDetails' => $bankwireDetails,
                'bankwireAddress' => $bankwireAddress,
                'bankwireOwner' => $bankwireOwner,
                'status' => 'ok',
                'reference' => $params['order']->reference,
                'contact_url' => $this->context->link->getPageLink('contact', true)
            ));

 

It's a bug? 
thanks best regards
 

 

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

I had a similar issue, the reason was that the order status (either the "Awaiting bank wire payment" id 10, or as in my case the order status id 12 On backorder) in Order Settings->Statuses, had checked 'Set the order as paid' and when the module calculates Total = TotalOrder minus TotalPaid = 0,00 , now if is not marked as Paid, the Total = TotalOrder - 0 = TotalOrder, and it the Total is displayed correctly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...