Jump to content

Change image  in the product page


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>
Link to comment
Share on other sites

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 😁

Link to comment
Share on other sites

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.

tjynMlp.png

Link to comment
Share on other sites

  • 6 months later...
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.

tjynMlp.png

Happy new year good sir!

Can you share this hook?

 

Would be greatly appreciated!

Edited by AffordableDomainsCanada
Link to comment
Share on other sites

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!).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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