Back to PhocacartGroup class

Method updateGroupProductRewardPointsById

public static
updateGroupProductRewardPointsById
(mixed $productId, mixed $pointsReceived, mixed $groupId = 1)

Method updateGroupProductRewardPointsById - Source code

public static function updateGroupProductRewardPointsById($productId, $pointsReceived, $groupId = 1)
{
    $db = Factory::getDBO();
    $query = 'UPDATE #__phocacart_product_point_groups SET' . ' points_received = ' . (int) $pointsReceived . ' WHERE product_id = ' . (int) $productId . ' AND group_id = ' . (int) $groupId;
    $db->setQuery($query);
    $db->execute();
}