andy60131 Posted November 26, 2008 Share Posted November 26, 2008 Is it possible to have different templates for each category of products? If yes, how? Thank you! Andy 0 Quote Link to comment Share on other sites More sharing options...
BionicInternet Posted November 27, 2008 Share Posted November 27, 2008 I am not 100% sure this is possible. What I would suggest is drop an ticket in to support and they might be able to do this for a small fee for you. 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted November 27, 2008 Share Posted November 27, 2008 (edited) I belive its possible. You might be able to just change the header and css by some smart {if} statements, but i'll leave it to you to explain exactly what you are trying to achieve first. As a idea, try it out by making a template for each category that you have, remembering to use the category name as the template name If your links are hardcoded on the site, you could just link directly to that category http://www.yourdom.com/whmcs/cart.php?gid=9&systemplate=categoryname Where you have menus, that still possible. if you take the category code from say your cart menu (this is 3.7.0 code) {else} <a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a> | {/if} {/foreach} and chnage it to {else} <a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}&systemtemplate={$productgroup.name}">{$productgroup.name}</a> | {/if} {/foreach} then when some-one changes product category from the cart, they'll get the template for that category. could be a bit of a pain managing that many templates though. Edited November 27, 2008 by Zorro67 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 27, 2008 Share Posted November 27, 2008 @Zorro67: good theory, problem is that the systemtemplates won't display the cart pages. 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted November 27, 2008 Share Posted November 27, 2008 Bugger, he's right. The system template that you display can only be set outside the cart, and once you get to the cart, your stuck with that one. Oh well, at least I offered a suggestion 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted December 4, 2008 Share Posted December 4, 2008 I was following another thread, and thought I wouldn't just take Sparky's word for it. Guess what, may does work; it is possible to change your template from within the cart, because it is still grabbing the header, footer & css inside the cart. It would therefore be possible to use a different image (for instance) in eac template, to suit the product group. With another smart template hack, you could have your checkout or other buttons then default back to your default template So feel free to try out my hack above & see what happens 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted December 4, 2008 Share Posted December 4, 2008 Hey no ones perfect In your header.tpl you could use this {if $smarty.server.PHP_SELF == '/cart.php'}PUT YOUR CART HEADER PAGE STUFF HERE {else} PUT YOUR NORMAL HEADER STUFF HERE {/if} You could do the same for the footer.tpl to display a different footer 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted June 29, 2009 Share Posted June 29, 2009 Not like me to troll, but I was working on something else and it twigged my thought on this thread. instead of changing the the template, why not use if stetements to change the css. therefore, you could have multiple css files, with different key elements (but mostly the same) which load depending upon the existing variables (eg GID) that are called. thats the tricky bit however. Maybe I'll give it a try, and post some pics. 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.