/* Used as payment rule */
public static function getShippingMethods($paymentId, $select = 0, $table = 'payment')
{
if ($table == 'payment') {
$t = '#__phocacart_payment_method_shipping';
$c = 'payment_id';
}
$db = Factory::getDBO();
if ($select == 1) {
$query = 'SELECT p.shipping_id';
} else {
$query = 'SELECT a.*';
}
$query .= ' FROM #__phocacart_shipping_methods AS a' . ' LEFT JOIN ' . $t . ' AS p ON a.id = p.shipping_id' . ' WHERE p.' . $c . ' = ' . (int) $paymentId;
$db->setQuery($query);
if ($select == 1) {
$items = $db->loadColumn();
} else {
$items = $db->loadObjectList();
}
return $items;
}