AffordableDomainsCanada Posted January 9, 2017 Share Posted January 9, 2017 Is there a way to set product images on the clientareaproductdetails.tpl page ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 9, 2017 Share Posted January 9, 2017 https://forum.whmcs.com/showthread.php?111411-editing-font-awesome-icons https://forum.whmcs.com/showthread.php?108179-Change-large-product-icons-on-Product-Details-page ... and if you mean you don't want to use fontawesome / glyphicons and would prefer an image, then it should just be a case of adding the URL to the appropriate image. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 9, 2017 Author Share Posted January 9, 2017 <div class="product-icon text-center"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-{if $type eq "hostingaccount" || $type == "reselleraccount"}{elseif $type eq "server"}database{else}archive{/if} fa-stack-1x fa-inverse"></i> </span> <h3>{$product}</h3> <h4>{$groupname}</h4> </div> Is there a way to make it so I can specify each product group? Right now it set for 3 icons, one for hosting accounts, reseller accounts, and server accounts. Or can it be coded some way that i can say product id 1 has fa-lock for examaple 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 9, 2017 Share Posted January 9, 2017 Is there a way to make it so I can specify each product group? use $groupname in that {if} statement instead if $type. Right now it set for 3 icons, one for hosting accounts, reseller accounts, and server accounts. Or can it be coded some way that i can say product id 1 has fa-lock for example use $pid if you know the product ID; or use $product if you it's name - $pid is probably technically better to use as you could rename the product at a later date and break this code, but you can't change it's ID. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 11, 2017 Author Share Posted January 11, 2017 groupname doesnt appear to work 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 11, 2017 Share Posted January 11, 2017 groupname doesnt appear to work it should do - and does for me in v7.1.1 <i class="fa fa-{if $groupname eq "Shared Hosting" || $type == "reselleraccount"}magic{elseif $type eq "server"}database{else}archive{/if} fa-stack-1x fa-inverse"></i> note I quickly changed 'hdd-o' to 'magic' and it's now showing the magic icon. in your image, the $groupname will be "Comodo SSL & Security" - but if it doesn't work for you with a particular product, add a {debug} to the template and see if the variable exists and what it is exactly called. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 12, 2017 Author Share Posted January 12, 2017 It was the '&' in the Comodo SSL & Security, it had to be changed to & 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 8, 2017 Author Share Posted July 8, 2017 (edited) Can you point out where I went wrong here? When a client orders a product, no matter which one, the original image is shown in the clientarea product area. {if $groupname eq "Liquidizer" || $pid == "40"}<img src="/images/products/original.jpg" alt="Original" width="162" height="208"> {elseif $pid eq "42"}<img src="/images/products/grapeape.jpg" alt="Grape Ape" width="162" height="208"> {elseif $pid eq "44"}<img src="/images/products/bananaOG.png" alt="Banana OG" width="162" height="208"> {elseif $pid eq "41"}<img src="/images/products/icehit.jpg" alt="IceHit" width="162" height="208"> {elseif $pid eq "43"}<img src="/images/products/pineappleexpress.png" alt="Pineapple Express" width="162" height="208"> {elseif $pid eq "45"}<img src="/images/products/strawberrycough.jpg" alt="Strawberry Cough" width="162" height="208"> {elseif $pid eq "46"}<img src="/images/products/6pack.jpg" alt="6 Pack Sample" width="162" height="208"> {/if} In the admin area the Group name is Liquidizer, and all the correct product id's correspond with the product.. Edited July 8, 2017 by AffordableDomainsCanada 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 8, 2017 Share Posted July 8, 2017 I assume that you're trying this in clientareaproductdetails.tpl ? if so, I gave it a quick test locally and it worked fine - obviously no images, but the alternative text showed for different products.... I can't see anything obviously wrong with the code - unless either $pid doesn't exist in whichever template you're trying to do this.... or PIDs 41-46 are in the liquidizer group and so the first $groupname condition is met and so doesn't get to the elseifs ? 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 8, 2017 Author Share Posted July 8, 2017 clientareaproductdetails.tpl is correct! I got it sorted, $groupname doesnt work, I used $gid, and the Liquidizer gid was 2 so I changed that, and it started to work! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 8, 2017 Share Posted July 8, 2017 we've entered the Twilight Zone here because productdetails doesn't use $gid - throw a {debug} into the template, and you should see that it doesn't exist. 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.