如何解决如何在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 举报,一经查实,本站将立刻删除。