how to remove [+£xxx] from product attributes on CART page (ie OrderSummary.cshtml )

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 anni tempo fa
Hi, I how can I remove the square brackets and price from OrderSummary.cshtml

eg    [+£xxx]    - this appears on the cart page.

(I still want to display the product attributes, just not the price adjustment as it looks confusing when the total already includes the price adjustment )

Thanks in advance
10 anni tempo fa
https://www.nopcommerce.com/boards/t/23624/hiding-the-price-adjustment-brackets-in-attributes-drop-down.aspx
10 anni tempo fa
Hi, Thanks

Yes, I'd found that and made the change but on the cart summary      OrderSummary.cshtml

the brackets still appear as part of the attribute information :

<div class="attributes">
@Html.Raw(item.AttributeInfo)
</div>

where do i edit to stop  [+£xxx] from appearing alongside the attribute information on the CART page ?

(I still want the attribute writing to appear, just not the price adjustment amount)
10 anni tempo fa
hi, just bumping this question^
7 anni tempo fa
Is there a solution? Anyone? I just don't want to use javascript to remove it....
7 anni tempo fa
I have the same problem here
7 anni tempo fa
Same here, bundled products looks bad when the non bundled price shows up after each product in the bundle. Also transfers all prices wrong to my shipworks system.

Need them to not show..
7 anni tempo fa
Hello Guys,

I have checked on 3.8 version and i think older version should have same logic as well and below is the solutions to Hide the price adjustment values from OrderSummary.cshtml

you need to change one line of code in Nop.Web/Controllers/ShoppingCartController.cs

Find the method PrepareShoppingCartModel

Find the region
#region Cart items
and find and replace below line

AttributeInfo = _productAttributeFormatter.FormatAttributes(sci.Product, sci.AttributesXml),


with below line

AttributeInfo = _productAttributeFormatter.FormatAttributes(sci.Product, sci.AttributesXml,_workContext.CurrentCustomer,renderPrices:false),


there is one overloaded method _productAttributeFormatter.FormatAttributes() on which we can pass renderPrices=false so it will not add the price adjustment values.

so suppose if you wanted to apply same logic to other places like on order detail page on admin or on frond end you need to find appropriate controller action and model filling method and you need to pass renderPrices=false so it will not show price adjustment value.
7 anni tempo fa
Just a user here...How do you do this ?

Kenny
7 anni tempo fa
larsenlights wrote:
Just a user here...How do you do this ?

Kenny


You need to modify the one line of code in checkout controllers

So it's little bit customization need for it

What you needed to change is already mentioned in above post
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.