Back to PhocacartShipping class

Method getAllShippingMethods

public static
getAllShippingMethods
(mixed $order = 'id', mixed $type = array())

Method getAllShippingMethods - Source code

public static function getAllShippingMethods($order = 'id', $type = array())
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id AS value, a.title AS text' . ' FROM #__phocacart_shipping_methods AS a';
    $query .= !empty($type) && is_array($type) ? ' WHERE a.type IN (' . implode(',', $type) . ')' : '';
    $query .= ' ORDER BY a.' . $order;
    $db->setQuery($query);
    $methods = $db->loadObjectList();
    return $methods;
}