如何在nopcommerce 4.3中从产品类别页面删除价格

问题描述

我要从类别页面删除产品价格。

现在,令人惊讶的主题是,从我在本地服务器中的代码运行良好,而我在实时服务器中发布了该代码却无法正常工作。

这是我的代码

@if(Model.ProductPrice.Price.Remove(0,1) != "0.00")
{
    <div class="prices">
        @if (!string.IsNullOrEmpty(Model.ProductPrice.OldPrice))
        {
            <span class="price old-price">@Model.ProductPrice.OldPrice</span>
        }
        <span class="price actual-price">@Model.ProductPrice.Price</span>
        @if (Model.ProductPrice.displayTaxShippingInfo)
        {
            var inclTax = workContext.TaxdisplayType == TaxdisplayType.IncludingTax;
            //tax info is already included in the price (incl/excl tax). that's why we display only shipping info here
            //of course,you can modify appropriate locales to include VAT info there
            <span class="tax-shipping-info">
                @T(inclTax ? "Products.Price.TaxShipping.InclTax" : "Products.Price.TaxShipping.ExclTax",Url.RouteUrl("Topic",new { SeName = Html.GetTopicSeName("shippinginfo") }))
            </span>
        }
        @if (!string.IsNullOrEmpty(Model.ProductPrice.BasePricePAngV))
        {
            <div class="base-price-pangv">
                @Model.ProductPrice.BasePricePAngV
            </div>
        }
    </div>
}

我在 nop.Web => 主题 => Emporium => 观看次数 =>中给出了条件共享 => _ProductBox.html

状态显示,如果价格大于零,则显示不显示

代码可在本地完美运行,而同一件事在实时服务器中不可用。

注意:我也在crome私人窗口中运行了实时站点,但仍然无法正常工作。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)