Remove [+$99.99] from Checkout Attributes in v2.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I am trying to figure out how to remove the amount in brackets showing the price change for my product variants. I have dynamic price update enabled and think showing this information would just confuse the customer. I have gotten as far as locating the file (_CheckoutAttributes.cshtml) where this information can be modified but don't know how to proceed. I saw a post from about a year ago that stated there was a HidePrices property to use but don't know how to make the change. I'm currently running nopCommerce v2.3 (no source). Listed below are the contents of _CheckoutAttributes.cshtml. Could someone please explain how this modification can be done. Thanks.


@model IList<Nop.Web.Models.ShoppingCart.ShoppingCartModel.CheckoutAttributeModel>
@using Nop.Core.Domain.Catalog;
@using Nop.Web.Framework;
@if (Model.Count > 0)
{
    <div class="checkout-attributes">
        @foreach (var attribute in Model)
        {
            string controlId = string.Format("checkout_attribute_{0}", attribute.Id);
            <div>
                @if (attribute.IsRequired)
                {
                    <span>*</span>
                }
                @if (!string.IsNullOrEmpty(attribute.TextPrompt))
                {
                    <span style="font-weight: bold">@attribute.TextPrompt</span>
                }
                else
                {
                    <span style="font-weight: bold">@attribute.Name</span>
                }
                @if (attribute.AttributeControlType == AttributeControlType.TextBox)
                {
                    <text>&nbsp;&nbsp;&nbsp;</text>
                }
                else
                {
                    <br />
                }
                @switch (attribute.AttributeControlType)
                {
                    case AttributeControlType.DropdownList:
                        {
                    <select name="@(controlId)" id="@(controlId)">
                        @if (!attribute.IsRequired)
                        {
                            <option value="0">---</option>
                        }
                        @foreach (var caValue in attribute.Values)
                        {
                            <option @(caValue.IsPreSelected ? " selected=\"selected\"" : null) value="@caValue.Id">@caValue.Name
                                @(!String.IsNullOrEmpty(caValue.PriceAdjustment) ? " [" + caValue.PriceAdjustment + "]" : null)
                            </option>
                        }
                    </select>
                        }
                        break;
                    case AttributeControlType.RadioList:
                        {
                            foreach (var caValue in attribute.Values)
                            {
                    <input id="@(controlId)" type="radio" name="@(controlId)" value="@caValue.Id" @(caValue.IsPreSelected ? " checked=\"checked\"" : null) <text> /></text>
                    <label for="@(controlId)">@caValue.Name @(!String.IsNullOrEmpty(caValue.PriceAdjustment) ? " [" + caValue.PriceAdjustment + "]" : null)</label>
                            }
                        }
                        break;
                    case AttributeControlType.Checkboxes:
                        {
                            foreach (var caValue in attribute.Values)
                            {
                    <input id="@(controlId)" type="checkbox" name="@(controlId)" value="@caValue.Id" @(caValue.IsPreSelected ? " checked=\"checked\"" : null) <text> /></text>
                    <label for="@(controlId)">@caValue.Name @(!String.IsNullOrEmpty(caValue.PriceAdjustment) ? " [" + caValue.PriceAdjustment + "]" : null)</label>
                            }
                        }
                        break;
                    case AttributeControlType.TextBox:
                        {
                    <input name="@(controlId)" type="text" id="@(controlId)" class="textBox" style="width:300px;" @(!String.IsNullOrWhiteSpace(attribute.DefaultValue) ? " value=" + attribute.DefaultValue : null) />
                        }
                        break;
                    case AttributeControlType.MultilineTextbox:
                        {
                    <textarea cols="20" id="@(controlId)" name="@(controlId)" rows="2" style="Width: 300px; Height: 150px;">@(!String.IsNullOrWhiteSpace(attribute.DefaultValue) ? attribute.DefaultValue : null)</textarea>
                        }
                        break;
                    case AttributeControlType.Datepicker:
                        {
                            @Html.DatePickerDropDowns(controlId + "_day", controlId + "_month", controlId + "_year", DateTime.Now.Year, DateTime.Now.Year + 1)
                        }
                        break;
                }
            </div>
        }
    </div>
}
6 years ago
somehow for v3.90 i also need to remove it.  Have you manage to do this?
6 years ago
https://www.nopcommerce.com/boards/t/28191/how-to-remove-xxx-from-product-attributes-on-cart-page-ie-ordersummarycshtml-.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.