26 lines
652 B
PHP
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();
|
|
}
|
|
}
|