ManagedCloud-Hosting Posted July 3, 2020 Share Posted July 3, 2020 Hi, Can we change the below image in the product page ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 3, 2020 Share Posted July 3, 2020 I think you need to do this with a hook: https://developers.whmcs.com/hooks-reference/output/#clientareaproductdetailsoutput But there is not much documentation about this. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 3, 2020 Share Posted July 3, 2020 45 minutes ago, VirtualWorldGlobal said: Can we change the below image in the product page ? if you were just changing one FA icon for another, then you could do that with a hook, but I assume you're more thinking of changing this for a proper image rather than using Font Awesome ? 8 minutes ago, yggdrasil said: I think you need to do this with a hook: i'd be tempted to think it was more clientareaheaderoutput if you were going to invoke css or jQuery changes. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 3, 2020 Share Posted July 3, 2020 Sure, he could change the Font Awesome icon but I assume he wants to add a custom image for each product which makes sense. Having an image that identifies that product. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 3, 2020 Share Posted July 3, 2020 2 minutes ago, yggdrasil said: I assume he wants to add a custom image for each product which makes sense. Having an image that identifies that product. so do I - but I doubt that hook you mention could be used to change an existing icon - whereas, you could do it in the header - though frankly, my first inkling would be to just edit the template. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 3, 2020 Share Posted July 3, 2020 Just now, brian! said: so do I - but I doubt that hook you mention could be used to change an existing icon - whereas, you could do it in the header - though frankly, my first inkling would be to just edit the template. I don't think this can be changed on the template files but I might be wrong. If memory serves me right, this output is generated by WHMCS ioncube and is not user accessible similar to the menus which have to be changed with hooks. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 3, 2020 Share Posted July 3, 2020 2 minutes ago, yggdrasil said: I don't think this can be changed on the template files but I might be wrong. If memory serves me right, this output is generated by WHMCS ioncube and is not user accessible similar to the menus which have to be changed with hooks. check the above link - they're just defined in the clientareaproductdetails page... <i class="fas fa-{if $type eq "hostingaccount" || $type == "reselleraccount"}hdd{elseif $type eq "server"}database{else}archive{/if} fa-stack-1x fa-inverse"></i> 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 3, 2020 Share Posted July 3, 2020 10 minutes ago, brian! said: check the above link - they're just defined in the clientareaproductdetails page... <i class="fas fa-{if $type eq "hostingaccount" || $type == "reselleraccount"}hdd{elseif $type eq "server"}database{else}archive{/if} fa-stack-1x fa-inverse"></i> You are correct. It is indeed in the template files 😁 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 3, 2020 Share Posted July 3, 2020 i've seen enough from preliminary testing to know that the FA icon can be changed to another icon or a real image, and that image/icon choice could be based on any variable - be it product ID, group name etc etc - all without touching the template and just using a specific method in an action hook. 1 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted July 3, 2020 Author Share Posted July 3, 2020 Hi @brian! Yes exactly what I wanted to change the it into something more colorful one. Thanks for your time and understanding...how do we do this ? Also can you please guide me with the following post - How to add all account contacts to a Support Ticket Thanks 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 9, 2021 Share Posted January 9, 2021 (edited) On 7/3/2020 at 1:52 PM, brian! said: i've seen enough from preliminary testing to know that the FA icon can be changed to another icon or a real image, and that image/icon choice could be based on any variable - be it product ID, group name etc etc - all without touching the template and just using a specific method in an action hook. Happy new year good sir! Can you share this hook? Would be greatly appreciated! Edited January 9, 2021 by AffordableDomainsCanada 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 11, 2021 Share Posted January 11, 2021 On 09/01/2021 at 00:05, AffordableDomainsCanada said: Can you share this hook? I would if it still worked.... tried it on v7.10 and later and it doesn't work... yet if I wrote it in July, that must be the version I originally tested in... hmm strange. you could certainly redefine the CSS of any FA5 icon to use another FA5 icon or an image file as content.... I wonder if that's what I did above ? (pity you didn't ask me at the time as I would have remembered!). 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 11, 2021 Share Posted January 11, 2021 2 hours ago, brian! said: I would if it still worked.... tried it on v7.10 and later and it doesn't work... yet if I wrote it in July, that must be the version I originally tested in... hmm strange. you could certainly redefine the CSS of any FA5 icon to use another FA5 icon or an image file as content.... I wonder if that's what I did above ? (pity you didn't ask me at the time as I would have remembered!). Do you have a hook that would allow me to even change the Product image? I was going to edit the config product tpl again but it just keeps getting over written. A hook would be ideal! I can figure out the FA5 icon colors etc... just need the hook that would change a pid or gid image 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 12, 2021 Share Posted January 12, 2021 19 hours ago, AffordableDomainsCanada said: Do you have a hook that would allow me to even change the Product image? I was going to edit the config product tpl again but it just keeps getting over written. A hook would be ideal! I can figure out the FA5 icon colors etc... just need the hook that would change a pid or gid image where are we - on the product details page or in the cart (configureproduct.tpl) ?? 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted January 17, 2021 Share Posted January 17, 2021 On 1/12/2021 at 12:04 PM, brian! said: where are we - on the product details page or in the cart (configureproduct.tpl) ?? Client Area >> Product/Service info for example, /clientarea.php?action=productdetails&id=16 0 Quote Link to comment Share on other sites More sharing options...
Fany Posted January 27, 2021 Share Posted January 27, 2021 Hi, has anyone changed the product image in version 8.0.x or 8.1? I don't understand how to do it. Thank you for the advice. 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.