Files
grzanieplus.pl/plugins/stPocztaPolskaPlugin/lib/model/PocztaPolskaPunktOdbioruPeer.php
2025-03-12 17:06:23 +01:00

26 lines
652 B
PHP

<?php
/**
* Subclass for performing query and update operations on the 'st_poczta_polska_punkt_odbioru' table.
*
*
*
* @package plugins.stPocztaPolskaPlugin.lib.model
*/
class PocztaPolskaPunktOdbioruPeer extends BasePocztaPolskaPunktOdbioruPeer
{
public static function isPobranie(Order $order)
{
$orderPayment = $order->getOrderPayment();
if ($order->isAllegroOrder())
{
return in_array($orderPayment->getAllegroPaymentType(), array('collect_on_delivery', 'cash_on_delivery'));
}
$paymentType = $orderPayment->getPaymentType();
return $paymentType->getIsCod();
}
}