rayb Posted January 22, 2016 Share Posted January 22, 2016 Here's the rub, I set up a package that includes parts that are priced lower than the ones included. I put in a negative amount in the configurable options so that these parts subtract from the order summary price. Now the parts that have positive amounts have the dollar amounts appear next to the part names in the drop down menu. However the parts with negative amounts do not. These act as if there is a zero there and doesn't show the price amount except in the order summary. Is there a way for the negative price to appear on the drop down menu? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 22, 2016 Share Posted January 22, 2016 These act as if there is a zero there and doesn't show the price amount except in the order summary. Is there a way for the negative price to appear on the drop down menu? if the price is negative, that isn't passed to the option name value - whereas it is if it's positive... this is either a bug or WHMCS have made a conscious decision to not get involved in negative pricing formats... you can fix it by editing the standard_cart/configureproduct.tpl template and changing ~line145 from... {$options.name} to... {$options.name}{if $options.recurring lt 0} {$currency.prefix}{$options.recurring}{$currency.suffix}{/if} and you'll end up with this (ignore that the prices are shown in GBP, they should show the chosen currency on your site)... I believe the above would be correct in the British currency format, but I think America tends to put negative values in parentheses, so you could use... {$options.name}{if $options.recurring lt 0} ({$currency.prefix}{$options.recurring|replace:'-':''}{$currency.suffix}){/if} you could then tweak that by adding "Save" to the output to emphasise that it is a reduction in price... though technically, you should probably use a Language Override to do this if using multiple languages. {$options.name}{if $options.recurring lt 0} (Save {$currency.prefix}{$options.recurring|replace:'-':''}{$currency.suffix}){/if} if you wanted to add a bit of colour to the output, you could modify the preceding line to add a class value to the option field. <option {if $options.recurring lt 0}class="pink" {/if}value="{$options.id}"{if $configoption.selectedvalue eq $options.id} selected="selected"{/if}> and then add the code below to six/css/custom.css option.pink {background-color: #ffcccc;} 0 Quote Link to comment Share on other sites More sharing options...
rayb Posted January 22, 2016 Author Share Posted January 22, 2016 Thank you very much kind sir. I was scratching my head for the past few days on this. This helps tremendously. Works as described! 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.