Jump to content

adding the product's custom fields to the client area products and services page


rwdemaer

Recommended Posts

I would like to add the product's custom field values to the client area "my products and services" page. I would like the custom field values to become part of the description of the product in the table.

 

I think it involves shoving $customfield.value somewhere close to line 20 in the clientareaproducts.tpl file but I am just not sure how to make it happen. Can anyone help me out?

 

<h2>{$LANG.clientareaproducts}</h2>

<table width="100%" border="0" cellpadding="10" cellspacing="0">

<tr>

<td>{$numproducts} {$LANG.recordsfound}, {$LANG.page} {$pagenumber} {$LANG.pageof} {$totalpages}</td>

<td align="right"><form method="post" action="clientarea.php?action=products"><input type="text" name="q" value="{if $q}{$q}{else}{$LANG.searchenterdomain}{/if}" class="searchinput" onfocus="if(this.value=='{$LANG.searchenterdomain}')this.value=''" /> <input type="submit" value="{$LANG.searchfilter}" class="searchinput" /></form></td>

</tr>

</table>

<br />

<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>

<br />

<table width="100%" border="0" cellpadding="10" cellspacing="0">

<tr>

<td>{$LANG.show}: <a href="clientarea.php?action=products{if $q}&q={$q}{/if}&itemlimit=10">10</a> <a href="clientarea.php?action=products{if $q}&q={$q}{/if}&itemlimit=25">25</a> <a href="clientarea.php?action=products{if $q}&q={$q}{/if}&itemlimit=50{if $q}&q={$q}{/if}">50</a> <a href="clientarea.php?action=products{if $q}&q={$q}{/if}&itemlimit=100">100</a> <a href="clientarea.php?action=products{if $q}&q={$q}{/if}&itemlimit=all">{$LANG.all}</a></td>

<td align="right">{if $prevpage}<a href="clientarea.php?action=products{if $q}&q={$q}{/if}&page={$prevpage}">{/if}« {$LANG.previouspage}{if $prevpage}</a>{/if}   {if $nextpage}<a href="clientarea.php?action=products{if $q}&q={$q}{/if}&page={$nextpage}">{/if}{$LANG.nextpage} »{if $nextpage}</a>{/if}</td>

</tr>

</table>

<br />

<table border="0" align="center" cellpadding="10" cellspacing="0">

<tr>

<td width="10" align="right" class="clientareatableactive"> </td>

<td>{$LANG.clientareaactive}</td>

<td width="10" align="right" class="clientareatablepending"> </td>

<td>{$LANG.clientareapending}</td>

<td width="10" align="right" class="clientareatablesuspended"> </td>

<td>{$LANG.clientareasuspended}</td>

<td width="10" align="right" class="clientareatableterminated"> </td>

<td>{$LANG.clientareaterminated}</td>

</tr>

</table><br />

Link to comment
Share on other sites

Custom fields are displayed on the clientareaproductdetials page as standard, but the relevant code appears to be missing from your template. Compare your template against the latest copy of one of the standard templates to see the code needed.

 

Yes, I am aware that the custom fields are on product details page. However, I was hoping to get the custom fields onto the client area products page. Currently the only way our customers can find a specific product or service is to go through and open up the details page for each product. This is because the products are differentiated by the custom fields, the product group and description fields are identical for many of their orders so they all look exactly the same on the products page.

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