Merhaba,
includes/hooks içerisine customfields_hook.php adında bir dosya oluştur veya ismi kendin yapabilirsin ve aşağıdaki kodları içerisine gir.
<?php
use WHMCS\Database\Capsule;
add_hook('ClientAreaPageProductsServices', 1, function($vars) {
$services = $vars['services'];
foreach ($services as $key => $service) {
$customFields = Capsule::table('tblcustomfieldsvalues')
->join('tblcustomfields', 'tblcustomfields.id', '=', 'tblcustomfieldsvalues.fieldid')
->where('tblcustomfieldsvalues.relid', $service['id'])
->where('tblcustomfields.type', 'product')
->select('tblcustomfields.fieldname', 'tblcustomfieldsvalues.value')
->get()
->map(function ($field) {
return (array) $field;
});
$services[$key]['customfields'] = $customFields;
}
return ['services' => $services];
});templates/temaismi/clientareaproducts.tpl dosyasını aç ve aşağıdaki kodu düzenleyerek gözükmesi istediğin yere yerleştirebilir ve düzenleyebilirsin. Mesela ben üründeki Sunucu İsmi yazan alanı yazdırmak istiyorum bu şekilde yazdırtıyorum. Sonraki ödeme tarihi benim kullanmış olduğum temamdaki dosyamda bu şekilde yazıyor burayı değiştirdim. Sen de farklı yazabilir.
<td class="text-left">
<span class="mobile__title d-md-none d-flex">{lang key='clientareahostingnextduedate'}</span>
<span><span class="w-hidden">{$service.normalisedNextDueDate}</span>{$service.nextduedate}</span>
</td> <td>
{foreach from=$service.customfields item=customfield}
{if is_object($customfield)}
{if $customfield->fieldname == "Sunucu İsmi"}
<li><strong>{$customfield->fieldname}:</strong> {$customfield->value}</li>
{/if}
{elseif is_array($customfield)}
{if $customfield.fieldname == "Sunucu İsmi"}
<li><strong>{$customfield.fieldname}:</strong> {$customfield.value}</li>
{/if}
{/if}
{/foreach}
</td>
Farklı şekilde ve şu şekilde daha iyi olabilir diyenler varsa yazabilir.