Ragonz Posted November 27, 2017 Share Posted November 27, 2017 Is there a way to trim what gets pulled into the order summary? so for example we have a configurable option called "Server Branding (Adds our company name to your servername for a small discount) " having this in the order form is useful as it gives the customer an idea of what they are paying for, however it clutters up the order summary box on the right quite a lot, so I'm wondering if we could trim it somehow to just "Server Branding" Link to comment Share on other sites More sharing options...
brian! Posted November 27, 2017 Share Posted November 27, 2017 2 hours ago, Ragonz said: Is there a way to trim what gets pulled into the order summary? so for example we have a configurable option called "Server Branding (Adds our company name to your servername for a small discount) " having this in the order form is useful as it gives the customer an idea of what they are paying for, however it clutters up the order summary box on the right quite a lot, so I'm wondering if we could trim it somehow to just "Server Branding" there would be a number of ways to do this using Smarty in the template... firstly, using 'replace' and changing {$configoption.name} to... {$configoption.name|replace:'(Adds our company name to your servername for a small discount)':''} you can use multiple replaces to replace multiple strings... {$configoption.name|replace:'(Adds our company name to your servername for a small discount)':''|replace:'(use the dropdown box to select one of our 17 datacenters)':''} and so on... second option would be to test if the configurable option name contains an opening bracket, and if so, remove everything after, and including, the bracket... {if $configoption.name|strstr:'('}{$configoption.name|strstr:'(':true}{else}{$configoption.name}{/if} obviously, this only works 100% if the only times you use brackets like this in configurable options are as descriptions... if not, you may have to use multiple replaces or wrap the above inside if statements to check for specific config option ids and act accordingly. becomes... 1 Link to comment Share on other sites More sharing options...
Ragonz Posted November 27, 2017 Author Share Posted November 27, 2017 Is this within configureproduct.tpl? Link to comment Share on other sites More sharing options...
brian! Posted November 27, 2017 Share Posted November 27, 2017 13 minutes ago, Ragonz said: Is this within configureproduct.tpl? oh sorry - should have mentioned the template to edit! it's ordersummary.tpl optionally, you could also use similar code in viewcart.tpl, if you want to trim that too. Link to comment Share on other sites More sharing options...
Ragonz Posted November 27, 2017 Author Share Posted November 27, 2017 hmm I was afraid of that, the template we use is the slider one, within that there is no ordersummary.tpl, does it pull it from somewhere else or should there be one? Link to comment Share on other sites More sharing options...
brian! Posted November 27, 2017 Share Posted November 27, 2017 1 minute ago, Ragonz said: hmm I was afraid of that, the template we use is the slider one, within that there is no ordersummary.tpl, does it pull it from somewhere else or should there be one? it will use standard_cart/ordersummary.tpl then... these templates will all use their own products.tpl template for the opening page of the cart, then for all the other pages, they'll use standard_cart. it's probably worth mentioning that Slider was removed from WHMCS in v6.2.. https://docs.whmcs.com/Standard_Order_Form_Templates#Slider so perhaps you're already using Universal Slider... Link to comment Share on other sites More sharing options...
brian! Posted November 29, 2017 Share Posted November 29, 2017 i'm glad to see that you managed to make this work on your site! Link to comment Share on other sites More sharing options...
Ragonz Posted November 29, 2017 Author Share Posted November 29, 2017 yes much appreciated that bud, just looks so much cleaner now. Link to comment Share on other sites More sharing options...
Recommended Posts