Close

Edit ShippingMethods View

robplayblue
9 years ago
#10291 Quote
Avatar
  • 14
Can you please tell me what the model is for Description.
I'm trying to add the Shipping description to the list of Shipping methods but can't figure out what the Description Model Element is. I tried adding the following below the <div> for Shipping Details
@if (!String.IsNullOrEmpty(shipping.Description))
{
    <div class="method-description">
        @Html.Raw(shipping.Description)
    </div>
}

Thanks
Robert
hristian.dimov
9 years ago
#10295 Quote
Avatar
  • Moderator
  • 386
robplayblue wrote:
Can you please tell me what the model is for Description.
I'm trying to add the Shipping description to the list of Shipping methods but can't figure out what the Description Model Element is. I tried adding the following below the <div> for Shipping Details
@if (!String.IsNullOrEmpty(shipping.Description))
{
    <div class="method-description">
        @Html.Raw(shipping.Description)
    </div>
}

Thanks
Robert


Hi Robert,

1. Open the Plugins\SevenSpikes.Nop.Plugins.RealOnePageCheckout\Scripts\app\shippingMethods\shippingMethods.controller.min.js file:

find this ( at the end of the file ): u.stringFormat=r.stringFormat
and replace it with this: u.stringFormat=r.stringFormat;u.renderShippingDescription=r.trustAsHtml

2. Open Plugins\SevenSpikes.Nop.Plugins.RealOnePageCheckout\Views\RealOnePageCheckout\ShippingMethod.cshtml and place this code:

<div ng-bind-html="vm.renderShippingDescription(shipping.description)"></div>

somewhere inside the <li ng-repeat="shipping in vm.shippingData.shippingMethods track by $index"> element.

Hope this helps!
Regards,
Hristian Dimov
Nop-Templates.com
robplayblue
9 years ago
#10298 Quote
Avatar
  • 14
Thanks that worked