Jump to content

Products/service groups don't show on a separate page


system53

Recommended Posts

Hi,

Services WHMCS is possible to show on separate pages. ?

 

Example;

Hosting - Reseller

Servers

Other Services

 

 

For example,

Hosting: clientarea.php?action=services&group=hosting - Only hosting and reseller web hosting services will appear.

Servers: clientarea.php?action=services&group=servers - Only dedicated and vps server services will appear.

Other: : clientarea.php?action=services&group=other - Only other services will appear.

 

The above-mentioned manner can be made in about how could you help me?

 

 

Thanks in advance for your suggestions and help.

 

Best regards,

Link to comment
Share on other sites

have you put Hosting, Servers and others into their own Product Groups ? if so, they'd effectively have different pages and can be called via their GID values.

 

if you haven't, and these Titles cover multiple existing groups, then you could probably modify products.tpl to display products from these groups - but you'd likely need an additional action hook to query the database because by default, WHMCS only knows about the products in the current Product Group.

Link to comment
Share on other sites

Could you help?

 

- - - Updated - - -

 

have you put Hosting, Servers and others into their own Product Groups ? if so, they'd effectively have different pages and can be called via their GID values.

 

if you haven't, and these Titles cover multiple existing groups, then you could probably modify products.tpl to display products from these groups - but you'd likely need an additional action hook to query the database because by default, WHMCS only knows about the products in the current Product Group.

 

Products in separate groups.

for example, a customer panel,

when a product category is purchased a dedicated, customer dedicated services in the form of this product on a separate page in the panel.

 

in the following way.

 

 

For example,

Hosting: clientarea.php?action=services&group=hosting - Only hosting and reseller web hosting services will appear.

Servers: clientarea.php?action=services&group=servers - Only dedicated and vps server services will appear.

Other: : clientarea.php?action=services&group=other - Only other services will appear.

Link to comment
Share on other sites

"client area products.we are making such a change in the TPL file

 

but it doesn't work

 

Under the code

{foreach from=$services item=service}

 

{if $service.group=="Web Hosting"&&$smarty.get.group eq "web-hosting"}
// {/foreach} Codes up to the line
  {else if $service.group=="Server"&&$smarty.get.group eq "server"}
// {/foreach} Codes up to the line
  {else}
// {/foreach} Codes up to the line
{/if}

 

 

connections it should be like this.

{whmcs url}/clientarea.php?action=products&group=web-hosting

 

{whmcs url}/clientarea.php?action=products&group=server

 

in previous versions, this operation was a success.

but not now

Link to comment
Share on other sites

oh sorry - I was thinking the question was about the cart... my mistake. :twisted:

 

if you're saying that you have 3 product groups (Hosting, Servers and Others) and, on the clientareaproducts.tpl page, you want to be able to limit the products shown in the table to one specific group, via the URL, then yes I think that can be done.

if these 3 groups each contain multiple product groups, then that would make it more complicated.

 

is that what you want to do - limit the products shown in the tablelist to one particular group? and which version of WHMCS are you using ??

Link to comment
Share on other sites

oh sorry - I was thinking the question was about the cart... my mistake. :twisted:

 

if you're saying that you have 3 product groups (Hosting, Servers and Others) and, on the clientareaproducts.tpl page, you want to be able to limit the products shown in the table to one specific group, via the URL, then yes I think that can be done.

if these 3 groups each contain multiple product groups, then that would make it more complicated.

 

is that what you want to do - limit the products shown in the tablelist to one particular group? and which version of WHMCS are you using ??

 

Thank you for the reply

 

Whmcs version: 7.1.1

I mentioned I edited the TPL file alone.

I haven't done a transaction with table list file.

 

Please tell me what I should do about this?

Link to comment
Share on other sites

in /six/clientareaproducts.tpl, you should see the following code that displays the table...

 

            {foreach key=num item=service from=$services}
               <tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)">
                   <td><strong>{$service.product}</strong>{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td>
                   <td class="text-center">{$service.amount}<br />{$service.billingcycle}</td>
                   <td class="text-center"><span class="hidden">{$service.normalisedNextDueDate}</span>{$service.nextduedate}</td>
                   <td class="text-center"><span class="label status status-{$service.status|strtolower}">{$service.statustext}</span></td>
                   <td class="responsive-edit-button" style="display: none;">
                       <a href="clientarea.php?action=productdetails&id={$service.id}" class="btn btn-block btn-info">
                           {$LANG.manageproduct}
                       </a>
                   </td>
               </tr>
           {/foreach}

all that you should need to do is add one {if} statement to that code...

 

            {foreach key=num item=service from=$services}
           {if $service.group eq $smarty.get.group or !$smarty.get.group}
               <tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)">
                   <td><strong>{$service.product}</strong>{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td>
                   <td class="text-center" data-order="{$service.amountnum}">{$service.amount}<br />{$service.billingcycle}</td>
                   <td class="text-center"><span class="hidden">{$service.normalisedNextDueDate}</span>{$service.nextduedate}</td>
                   <td class="text-center"><span class="label status status-{$service.status|strtolower}">{$service.statustext}</span></td>
                   <td class="responsive-edit-button" style="display: none;">
                       <a href="clientarea.php?action=productdetails&id={$service.id}" class="btn btn-block btn-info">
                           {$LANG.manageproduct}
                       </a>
                   </td>
               </tr>
           {/if}
           {/foreach}

you should then be able to show specific table data using your URLs...

 

all data -> clientarea.php?action=products

web-hosting only -> clientarea.php?action=products&group=web-hosting

servers only -> clientarea.php?action=products&group=servers

 

when using "group" like this, you need to get the product groupname correct in terms of it's case - e.g if your product groupname is "Web Hosting", then the following will work...

 

clientarea.php?action=products&group=Web Hosting

 

but the following won't...

 

clientarea.php?action=products&group=web hosting

 

though you could get around that by adding |capitalize to the {if} statement if all your products groups are capialized in that way... but going from your examples, that may not be necessary in your case. :)

 

this is tested locally as working. :idea:

Link to comment
Share on other sites

  • 3 weeks later...

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