Add classes to Payment-method-status Value dependingly on payment and shipping status.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 yıl önce
Hi.

Using nopC 3.90


What I need is to add classes to <span class="value @new-class"> in /Views/Order/Details.cshtml

in

<li class="payment-method-status">
                                    <span class="label">
                                        @T("Order.Payment.Status"):
                                    </span>
                                    <span class="value @new-class-here">
                                        @Model.PaymentMethodStatus
                                    </span>
                                </li>


and

<li class="shipping-status">
                                    <span class="label">
                                        @T("Order.Shipping.Status"):
                                    </span>
                                    <span class="value @new-class-here">
                                        @Model.ShippingStatus
                                    </span>
                                </li>


Following classes should be added: paid, payment-pending, shipped and etc. dependingly on the status.

How to do it? Any ideas?

Thanks.
4 yıl önce
Hello,

You will have to add this code:

@{
    var status = Model.OrderStatus.ToString();
}


and then where you want to display the class add this


<li class="payment-method-status">
    <span class="label">
        @T("Order.Payment.Status"):
    </span>
    <span class="value @status">
        @Model.PaymentMethodStatus
    </span>
</li>


I hope this helps,
Nikola
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.