Package issue with Quick Checkout Module

Discussion in 'TemplateCodes' started by metrony, May 16, 2010.

Thread Status:
Not open for further replies.
  1. metrony Customer

    There seems to be an issue with the packages available in the 'Choose Advertising Package' section. Currently it's showing all active packages when it should show only the packages available to that specific user group.

    It looks like this issue is just limited to the user group. The category criteria is working fine.

    Can you please verify you're seeing the same thing?

    Thanks.
  2. seymourjames All Hands On Deck

    This appears to be a bug. in due course we will issue a fix.
  3. metrony Customer

    Thanks for confirming it as a bug. Hopefully you'll get to updating it soon. Since I depend on that functionality I have to hold off on using the module until it's fixed.
  4. TemplateCodes-Mike TemplateCodes

    metrony,

    Thanks for bringing this to our attention. A fix will be coming very soon.

    Thank you for your patience.
  5. John Snyder Staff

    This is now fixed, seems I refactored this method and forgot to reinclude the user group stuff. David should be updating the source but for anyone else who wants to modify it on their own here is the file:

    modules/quick_checkout/includes/QC_Products.php

    find the method:

    PHP:
    public static function getCategoryProducts($categoryId)
    then look inside it for a while loop (line 48 or so) and replace this:

    PHP:
    while($row $Result->fetch()) {
        foreach (
    $row as $key => &$value) {
            
    $value stripslashes($value);
        }
        unset(
    $value);
        
    $rows[] = $row;
    }
    with this:

    PHP:
    while($row $Result->fetch()) {
        foreach (
    $row as $key => &$value) {
            
    $value stripslashes($value);
        }
        unset(
    $value);
        if(
    $row['pGroup'] == 0) {
            
    //if no usergroup selected
            
    $rows[] = $row;
        } elseif(
    $row['pGroup'] <> && $row['pGroup'] == (int)$_SESSION['userlevel']) {
            
    //if usergroup selected and they are a member.
            
    $rows[] = $row;
        }
    }
    This should fix any issues regarding packages and the related user group permissions.
Thread Status:
Not open for further replies.

Share This Page