Back to PhocacartReward class

Method getRewardPointsByOrderId

public static
getRewardPointsByOrderId
(mixed $orderId)

Method getRewardPointsByOrderId - Source code

public static function getRewardPointsByOrderId($orderId)
{
    if ((int) $orderId > 0) {
        $db = Factory::getDBO();
        $query = 'SELECT a.title, a.points, a.order_id, a.type, a.published FROM #__phocacart_reward_points AS a' . ' WHERE a.order_id = ' . (int) $orderId . ' ORDER BY a.id';
        $db->setQuery($query);
        $points = $db->loadObjectList();
        if (!empty($points)) {
            return $points;
        }
    }
    return false;
}