Back to PhocacartProduct class

Method getProductsFull

public static
getProductsFull
(mixed $limitOffset = 0, mixed $limitCount = 1, mixed $orderingItem = 1)

Method getProductsFull - Source code

// No access rights, publish, stock, etc. Not group contacts, but * - we really need it
public static function getProductsFull($limitOffset = 0, $limitCount = 1, $orderingItem = 1)
{
    /*phocacart import('phocacart.ordering.ordering');*/
    $ordering = PhocacartOrdering::getOrderingCombination($orderingItem);
    $db = Factory::getDBO();
    $wheres = array();
    $where = count($wheres) ? ' WHERE ' . implode(' AND ', $wheres) : '';
    $q = ' SELECT a.*';
    // No Images, Categories, Attributes, Specifications here
    $q .= ', CONCAT_WS(":", t.id, t.alias) AS tax';
    $q .= ', CONCAT_WS(":", m.id, m.alias) AS manufacturer';
    $q .= ' FROM #__phocacart_products AS a' . ' LEFT JOIN #__phocacart_taxes AS t ON t.id = a.tax_id' . ' LEFT JOIN #__phocacart_manufacturers AS m ON m.id = a.manufacturer_id' . $where;
    if ($ordering != '') {
        $q .= ' ORDER BY ' . $ordering;
    }
    if ((int) $limitCount > 0) {
        $q .= ' LIMIT ' . (int) $limitOffset . ', ' . (int) $limitCount;
    }
    $db->setQuery($q);
    $products = $db->loadAssocList();
    return $products;
}