Price group in member page?

Discussion in 'Troubleshooting' started by moonwalker, Jan 7, 2011.

  1. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
    Hi,

    I'm using Price Groups to show different products for each language.

    The problem I'm facing now is the fact that Price Group doesn't work in the member page. I see the products for the English language on both French and Dutch language.

    Is there an option I missed or something?

    Thanks in advance.

    Edit: It seems only to work when I do the following:
    member.php?tab=add_renew&price_group=-1 [Dutch]
    member.php?tab=add_renew&price_group=-2 [French]
    member.php?tab=add_renew [English]

    The problem is when people start navigating through the tabs, the price group is lost. The only thing I can think of, is to add the price groups manually to the "add_renew" tab. Is there another solution before I start editing those pages?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This is expected. Products with negative price groups will not be available in default renewal form.
    Try to add this code at the top of member.php after include "config.inc.php":
    PHP:

    $u 
    $_SESSION[_amember_user];
    $lang $u['data']['selected_lang'] ? $u['data']['selected_lang'] : get_default_lang();
    switch(
    $lang){
    case 
    'du'$price_group=-1; break;
    case 
    'fr'$price_group=-2; break;
    default : 
    $price_group='';
    }
    $_REQUEST[price_group] = $_GET[price_group] = $price_group
    Let me know if this will not help.
  3. moonwalker

    moonwalker aMember Pro Customer

    Joined:
    Aug 21, 2010
    Messages:
    52
    @Alexander:
    Thanks a lot for your help. Your code worked like a charm.

    Only one thing changed: "du" -> "nl". Dutch language instead of German language.

    Thanks again!

Share This Page