Schonix Posted September 24, 2013 Share Posted September 24, 2013 Hello I am currently set to use the Slider Orderform. I would like to customize my product groups and turn them into the image of my choice instead. Here is my cart: /https://www.schonix.com/hosting/clients/cart.php Instead of "Free Web Hosting" I would like to add an image inside the small hover boxes and/or replace the text completely with an image. Can anybody think of an easy way to do this? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 25, 2013 Share Posted September 25, 2013 the easiest way I can think of would be to modify products.tpl inside your slider orderform template. in this example below, i'm replacing the text entirely with an image... so on line 44 is the following line of code... <div class="prodcats"><div><a href="cart.php?gid={$productgroup.gid}">{$productgroup.name}</a></div></div> replace it with the following line... <div class="prodcats"><div><a href="cart.php?gid={$productgroup.gid}"><img src="templates/orderforms/slider/images/prodimage{$productgroup.gid}.png"></a></div></div> what you will then need to do is create the images and name them so their group IDs are in their filenames - so for your site, you would need the following images for their respective group titles.. prodimage1.png -> Shared Web Hosting prodimage2.png -> Reseller Web Hosting prodimage4.png -> Virtual Private Servers prodimage6.png -> Free Web Hosting upload the images to the "images" directory within the "slider" orderform directory. for the non-products (e.g addon, domain registration and transfers), you can modify the code in a similar way. {if $gid neq "addons"}<div class="prodcats"><div><a href="cart.php?gid=addons">{$LANG.cartproductaddons}</a></div></div>{/if}{if $renewalsenabled && $gid neq "renewals"}<div class="prodcats"><div><a href="cart.php?gid=renewals">{$LANG.domainrenewals}</a></div></div>{/if} {/if} {if $registerdomainenabled && $domain neq "register"}<div class="prodcats"><div><a href="cart.php?a=add&domain=register">{$LANG.registerdomain}</a></div></div>{/if} {if $transferdomainenabled && $domain neq "transfer"}<div class="prodcats"><div><a href="cart.php?a=add&domain=transfer">{$LANG.transferdomain}</a></div></div>{/if} just replace the {$LANG.???} with a similar img link as previously - though you can give the images specific filenames now as they're not being called in a loop.... ignore the temptation to alter them in the language files. ideally, what you would also do in the code is first check to see if the image exists - if not, display the text instead - but as you only have four groups and you wanted it kept simple, I haven't bothered - there shouldn't be any need for it in your case anyway. note, there is an error in your products.tpl line at lines 70 & 71 - the same line is duplicated, so you will see two "Register Domain" links in your category section... as outlined above, you can also replace the text in these categories with images too. btw - as you are modifying the template code in the slider orderforms, it might be worth copying the slider folder, renaming it and reuploading to the site - the reason being that when you come to update WHMCS, you may overwrite these changes - but if you rename the directory, this shouldn't be an issue. 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.