Jump to content

$LANG variable Based on $gid


JimW

Recommended Posts

I need descriptions for each product group.

 

In products.tpl I thought this might work:

{$LANG.group$gid}

 

With these lang vars based on the group id:

$_LANG['group1'], $_LANG['group2'], $_LANG['group2'] etc.

 

Syntax wrong?

 

However, this works:

{$LANG.$gid}

With these lang vars:

$_LANG['1'], $_LANG['2'], $_LANG['1'] etc.

 

Any any help would be greatly appreciated?

 

I'm used to working with carts and having Category Descriptions, this is really lacking in WHMCS.

Link to comment
Share on other sites

just make the array multidimensional. in your lang files, define them like this

 

$_LANG['1']['2'] = 'Description for product ID 2 in group id 1';
$_LANG['1']['4'] = 'Description for product ID 4 in group id 1';

 

Then reference them in your template as:

 

{$LANG.$gid.$pid}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated