zomex Posted March 24, 2011 Share Posted March 24, 2011 (edited) Hello everyone, The problem As it stands the shopping cart templates (cart.php not Ajax) use the header.tpl and footer.tpl files of the main WHMCS template selected. This means that the shopping cart uses the same header and footer files as the rest of WHMCS. My Suggestion - Add the header.tpl and footer.tpl includes to the shopping cart files instead of the encoded files. This will give us the ability to style the shopping cart differently that the other (less important) client side areas of WHMCS (tickets, knowledgebase, contact form etc) The reason why this should be implemented My main reason for this request is that it would allow us to remove the clutter that's a distraction to the visitor on the order pages (menu. sidebar, links in general) which in-turn will drastically increase your conversion rates. Worth noting This is already the case for the Ajax order form: Thanks, Jack Edited March 24, 2011 by zomex 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 25, 2011 Author Share Posted March 25, 2011 This is what I mean: Before: http://img708.imageshack.us/img708/1703/beforenr.png After: http://img121.imageshack.us/img121/3223/afteru.png 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted March 25, 2011 Share Posted March 25, 2011 you can change what shows up in the order area using if statements. example: http://forum.whmcs.com/showthread.php?t=21209 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 25, 2011 Author Share Posted March 25, 2011 you can change what shows up in the order area using if statements. example: http://forum.whmcs.com/showthread.php?t=21209 Thanks that's perfect! I'll give that a shot and see how it works out. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 25, 2011 Author Share Posted March 25, 2011 you can change what shows up in the order area using if statements. example: http://forum.whmcs.com/showthread.php?t=21209 I'm experimenting with this and so far I'm able to get areas to work as I like but in some cases it simply isn't working as it should when looking at the code (it's probably my lack of PHP knowledge ). For example: {if $pagetitle != 'Shopping Cart'} <div id="copyright"> <p><a href="/legal/terms-of-service.php" title="Terms Of Service" class="tooltip">Terms Of Service</a> | <a href="/legal/acceptable-usage-policy.php" title="Acceptable Usage Policy" class="tooltip">Acceptable Usage Policy</a> | <a href="/legal/privacy-policy.php" title="Privacy Policy" class="tooltip">Privacy Policy</a> | <a href="/legal/disclaimer.php" title="Disclaimer" class="tooltip">Disclaimer</a> | <a href="/sitemap.php" title="Website Sitemap" class="tooltip">Sitemap</a><br />This website and its content are copyright of Zomex - © Zomex 2011. All rights reserved.</p> </div> {else} {php} include("../files/includes/footer.php"); {/php} {/if} The above code will show the footer include contents on the cart but the slimmed down version on the other WHMCS pages. Looking at the code it should show the copyright div content on the shopping cart pages and the footer include content on all other pages. Is it not possible to use this if statement with the else tag? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted March 26, 2011 Share Posted March 26, 2011 {if $pagetitle != 'Shopping Cart'} Content Here will show on every page but the cart {else} Content here will show on cart {/if} 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 26, 2011 Author Share Posted March 26, 2011 {if $pagetitle != 'Shopping Cart'} Content Here will show on every page but the cart {else} Content here will show on cart {/if} Thanks mate! I've got the header and footer HTML content working perfectly. The only issue that I'm having now is with applying 2 styles to the shopping cart pages. The varible itself is showing the code of the correct page but for some reason when I view source the CSS has been removed. Here's my code: {if $pagetitle != 'Shopping Cart'} <link type="text/css" rel="stylesheet" href="/files/css/style.css" /> {else} <style type="text/css"> body { background: #000; } .logo { margin: 0 0 0 20px; } </style> <link type="text/css" rel="stylesheet" href="/files/css/style.css" /> {/if} The correct code is showing up on the right pages but when I view source on the cart pages it displays this instead (As you can imagine this is in the <head> section): <style type="text/css"> body .logo </style> I could create a different stylesheet for the cart page but that would mean updating 2 stylesheets all of the time so if I can resolve this it will be perfect. Cheers. 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted March 26, 2011 Share Posted March 26, 2011 try {literal} <style type="text/css"> body { background: #000; } .logo { margin: 0 0 0 20px; } </style> {/literal} 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 26, 2011 Author Share Posted March 26, 2011 try {literal} <style type="text/css"> body { background: #000; } .logo { margin: 0 0 0 20px; } </style> {/literal} I always assumed that {literal} was for inline javascript but I assumed wrongly Everything is working perfectly, thanks for your help! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted March 28, 2011 WHMCS CEO Share Posted March 28, 2011 Here's a slightly better solution than what you've already got there for the header.tpl and footer.tpl files: {if $pagetitle eq $LANG.carttitle} Display Shopping Cart Header/Footer {else} Display Normal Header/Footer {/if} The benefit of this is that it works the same for all languages. Your current method only works for English. And the literal tags need to be used to enclose any code that contains { or } characters to stop smarty trying to interpret them as template tags. Hope this helps. Matt 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 28, 2011 Author Share Posted March 28, 2011 Here's a slightly better solution than what you've already got there: {if $pagetitle eq $LANG.carttitle} Display Shopping Cart Header/Footer {else} Display Normal Header/Footer {/if} The benefit of this is that it works the same for all languages. Your current method only works for English. And the literal tags need to be used to enclose any code that contains { or } characters to stop smarty trying to interpret them as template tags. Hope this helps. Matt Cheers Matt I'll get that changed. 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.