Metahuman Network Posted November 2, 2020 Share Posted November 2, 2020 Hello! I'm trying to get the Configurable Option to show next to the Product name in the client area products view. Is there a way to pull this without having the product selected and heading to productdetails? Essentially, configoption is server location. Looking to show {$service.group} - {$service.product} - {$configoptiondetails} Screenshot attached. Any insight? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 3, 2020 Share Posted November 3, 2020 16 hours ago, Metahuman Network said: Is there a way to pull this without having the product selected and heading to productdetails? you could use a ClientAreaPageProductsServices hook to loop through the $services array in the template, and modify the $service.product value to contain your preferred layout (optionally checking it's a VPS product first) - group name & product should already exist in the array, so a database query to obtain the configurable option value you need will be required. btw - are you aware of the CSS issue in your "join our mailing list" option at checkout where it's showing with 100% height ?? 0 Quote Link to comment Share on other sites More sharing options...
Metahuman Network Posted November 3, 2020 Author Share Posted November 3, 2020 Hey Brian! Thanks for the CSS reminder. I broke that late last night and was too tired to do anything about it, ha! -FIXED- I copied Virtualizor's server addon db query for configoptions and it kinda works, I'll tinker around and post my solution when it's... Not messy. 0 Quote Link to comment Share on other sites More sharing options...
Metahuman Network Posted December 3, 2020 Author Share Posted December 3, 2020 So I went a different route for this and just used available smarty array variables. For clientareaproducts: <td><strong>{$service.group} - {$service.product}{if ($service.group == 'WireGuard')} - {$service.server.name|replace:'WG - ':''|replace:'1':''|replace:'2':''|replace:'3':''}{/if}</strong></td> I use a custom hook to assign to a server group upon provision, so I just pull the server name and remove the formatting/id scheme to just display the City/State for products in that group. Displays as: For clientareaproductdetails: {if $configurableoptions && $groupname=='WireGuard'} {if !$domain && !$moduleclientarea} in active{/if} {foreach from=$configurableoptions item=configoption} <h4>{if $configoption.optiontype eq 3}{if $configoption.selectedqty}{$LANG.yes}{else}{$LANG.no}{/if}{elseif $configoption.optiontype eq 4}{$configoption.selectedqty} x {$configoption.selectedoption}{else}{$configoption.selectedoption}{/if}</h4> {/foreach} {/if} Since WHMCS already pulls the Configurable Options info for this page, just have to limit it to a group and display where you want it. 🙂 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.