FacebookTwitterDiggGoogle BookmarksRedditTechnoratiLinkedinRSS Feed
Pin It

Remove Costing from the Self Service Portal

Video coming soon!

Out on the road last week, I was asked if it is possible to remove all costing information to the end user portal while still keeping costing information within reports. This customer wanted to be able to do this so that they could perfect their costing models before publishing it and scaring the customers too much. Below is a description of how to remove the cost information from the list of blueprints, on the request screen, and multi-machine request screen of the self service portal. 

Here are all of the files available for download and installation if you like the way it looks

Backup Reminder

Whenever you're alter files, make sure to take a backup of the files before you change them!!

 Warning

Remove Costing From Bleuprint List Screen

1. On the vCAC web server, open up Windows Explorer and navigate to: "C:\Program Files (x86)\DynamicOps\Self-Service Portal\Views\Blueprint"
2. Open "Blueprints.cshtml" in a text editor
3. Remove the following lines

{codecitation} 
cols.Bound(bp => bp.MinCost).Title(Titles.DailyCost)
     .ClientTemplate("<div>#= Cost #</div>")
     .HtmlAttributes(new { style = "text-align:right;" }); 
{/codecitation} 

4. Save the file

The other option is to take the easy way out and download the edited file here

Before
VMware vCAC Blueprint List Before
After
VMware vCAC Blueprint List After

Remove Costing From Request Screen

1. On the vCAC web server, open up Windows Explorer and navigate to: "C:\Program Files (x86)\DynamicOps\Self-Service Portal\Views\Request"

2. Open "NewRequest.cshtml" in a text editor
3. Remove the following lines

{codecitation} 
.cost td { text-align: right; }
{/codecitation} 

{codecitation} 

$("#costTab").click(function () {
            var numberOfMachines = parseFloat($('input[name="@this.Model.NumberOfMachinesRow.FormInputName"]').val());

            var minCost = parseFloat($("#cost-min").attr("data-cost-min"));
            var maxCost = parseFloat($("#cost-max").attr("data-cost-max"));
           
            if (numberOfMachines !== undefined && minCost !== undefined && maxCost !== undefined) {
                var totalMinCost = numberOfMachines * minCost;
                var totalMaxCost = numberOfMachines * maxCost;

                $("#cost-machines").html(numberOfMachines);
                $("#cost-min").html(kendo.toString(totalMinCost, "c"));
                $("#cost-max").html(kendo.toString(totalMaxCost, "c"));

            }
{/codecitation} 

{codecitation} 
<li>
<a targetTab="#cost-tab" id="costTab">@Titles.CostSummary<span>@Titles.CostSummaryDetails</span></a>
</li>
{/codecitation} 

{codecitation} 
                    <div id="cost-tab" class="tab-content">
                        <h2>@Titles.CostSummary</h2>

                        <table class="data display large cost">
                            <thead>
                                <tr>
                                    <th></th>
                                    <th>@Titles.NumberOfMachines</th>
                                    <th>@Titles.MinDailyCost</th>
                                    <th>@Titles.MaxDailyCost</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="even">
                                    <td>@Labels.PerMachine</td>
                                    <td>1</td>
                                    <td>@(string.Format("{0:C}", this.Model.MachineRequest.Blueprint.MinCost.GetValueOrDefault()))</td>
                                    <td>@(string.Format("{0:C}", this.Model.MachineRequest.Blueprint.MaxCost))</td>
                                </tr>
                                <tr class="">
                                    <td colspan="4"><hr/></td>
                                </tr>
                                <tr class="even">
                                    <td><strong>@Labels.DailyTotal</strong></td>
                                    <td><strong><span id="cost-machines">1</span></strong></td>
                                    <td><strong><span id="cost-min" data-cost-min="@this.Model.MachineRequest.Blueprint.MinCost.GetValueOrDefault()">$0.00</span></strong></td>
                                    <td><strong><span id="cost-max" data-cost-max="@this.Model.MachineRequest.Blueprint.MaxCost">$0.00</span></strong></td>
                                </tr>
                            </tbody>
                        </table>

                    </div>
{/codecitation} 

4. Save the file

The other option is to take the easy way out and download the edited file here

Before
VMware vCAC Self-Service Request Screen Before
After
VMware vCAC Self-Service Request Screen After

Remove Costing From Multi-Machine Request Screen

1. On the vCAC web server, open up Windows Explorer and navigate to: "C:\Program Files (x86)\DynamicOps\Self-Service Portal\Views\Request"

2. Open "AppService.cshtml" in a text editor
3. Remove the following lines

{codecitation} 
<span class="pricing_price_label">@component.NewComponentMachineRequest.MachineRequest.Blueprint.Cost @Labels.Daily</span>
{/codecitation} 

{codecitation} 
<th>@Titles.DailyCost</th>
{/codecitation} 

{codecitation} 
<tr class="@(odd ? "odd" : "even")">
                                <td title="@Labels.AppService">@Labels.AppService</td>
                                <td class="component-count" id="appservice_count"></td>
                                <td class="component-price" id="appservice_price" data-cost="@this.Model.AppServiceCost">@string.Format("{0:C}", this.Model.AppServiceCost)</td>                            </tr>
{/codecitation} 

{codecitation} 
<tr class="even">
                                <td><strong>@Labels.DailyTotal</strong></td>
                                <td id="component-total-count"><strong>0</strong></td>
                                <td id="component-total-price"><strong>$0.00</strong></td>                      </tr>
{/codecitation} 

4. Save the file

The other option is to take the easy way out and download the edited file here

Before
VMware vCAC Self-Service Multi-Machine Request Screen Before
VMware vCAC Self-Service Multi-Machine Request Screen Before
After
VMware vCAC Self-Service Multi-Machine Request Screen After
VMware vCAC Self-Service Multi-Machine Request Screen After