Jump to content

products list on the homepage


vadimisakanov

Recommended Posts

Hi, hosting and billing professionals!

 

I'm trying to customize my WHMCS userspace and have difficulties with that.

I want to put a list of products that a user has signed up to on the page

https://mydomain.com/members/clientarea.php

through editing clientareahome.tpl.

I simply copy the followint code from clientareproducts.tpl:

 

<table class="data" width="100%" border="0" cellpadding="10" cellspacing="0">
 <tr>
   <th><a href="clientarea.php?action=products{if $q}&q={$q}{/if}&orderby=product">{$LANG.orderproduct}</a>{if $orderby eq "product"} <img src="images/{$sort}.gif" alt="" border="0" />{/if}</th>
   <th><a href="clientarea.php?action=products{if $q}&q={$q}{/if}&orderby=price">{$LANG.orderprice}</a>{if $orderby eq "price"} <img src="images/{$sort}.gif" alt="" border="0" />{/if}</th>
   <th><a href="clientarea.php?action=products{if $q}&q={$q}{/if}&orderby=billingcycle">{$LANG.orderbillingcycle}</a>{if $orderby eq "billingcycle"} <img src="images/{$sort}.gif" alt="" border="0" />{/if}</th>
   <th><a href="clientarea.php?action=products{if $q}&q={$q}{/if}&orderby=nextduedate">{$LANG.clientareahostingnextduedate}</a>{if $orderby eq "nextduedate"} <img src="images/{$sort}.gif" alt="" border="0" />{/if}</th>
   <th width="20"> </th>
 </tr>
 {foreach key=num item=service from=$services}
 <tr class="clientareatable{$service.class}">
   <td>{$service.group} - {$service.product}{if $service.domain}<br />
   <a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td>
   <td>{$service.amount}</td>
   <td>{$service.billingcycle}</td>
   <td>{$service.nextduedate}</td>
   <td><form method="post" action="{$smarty.server.PHP_SELF}?action=productdetails">
       <input type="hidden" name="id" value="{$service.id}" />
       <input type="image" src="images/viewdetails.gif" alt="{$LANG.clientareaviewdetails}" />
   </form></td>
 </tr>
 {foreachelse}
 <tr>
   <td colspan="6">{$LANG.norecordsfound}</td>
 </tr>
 {/foreach}
</table>

 

and paste it to clientareahome.tpl

After that WHMCS does put the table with that contents on the clientarea.php page, but it does not display any products, just saying "No records found".

What am I doing wrong and how is it better to display user's products right on the clientarea.php page?

 

Thanks for attention!

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 months 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