var discountForProducts = _discountService.GetAllDiscountsForCaching().Where(p => !p.IsCumulative == true &&
(p.DiscountType == DiscountType.AssignedToSKUProductTuple
|| p.DiscountType == DiscountType.AssignedToSkus));
var discountForProducts = _discountService.GetAllDiscountsForCaching().Where(p => !p.IsCumulative == true &&
(p.DiscountType == DiscountType.AssignedToSKUProductTuple
|| p.DiscountType == DiscountType.AssignedToSkus));
protected virtual decimal GetOrderTotalDiscount(Customer customer, decimal orderTotal, out List<DiscountForCaching> appliedDiscounts)
{
appliedDiscounts = new List<DiscountForCaching>();
decimal discountAmount = decimal.Zero;
if (_catalogSettings.IgnoreDiscounts)
return discountAmount;
var allDiscounts = _discountService.GetAllDiscountsForCaching(DiscountType.AssignedToOrderTotal);
//TODO:: I think some path of logic missing there?????
//TODO::
var allowedDiscounts = new List<DiscountForCaching>();
if (allDiscounts != null)
foreach (var discount in allDiscounts)
if (_discountService.ValidateDiscount(discount, customer).IsValid &&
!allowedDiscounts.ContainsDiscount(discount))
{
allowedDiscounts.Add(discount);
}
appliedDiscounts = allowedDiscounts.GetPreferredDiscount(orderTotal, out discountAmount);
if (discountAmount < decimal.Zero)
discountAmount = decimal.Zero;
if (_shoppingCartSettings.RoundPricesDuringCalculation)
discountAmount = RoundingHelper.RoundPrice(discountAmount);
return discountAmount;
}
Compiler error message: CS1061: "System.Web.Mvc.HtmlHelper <Nop.Plugin.Misc.FeedbackAboutUs.Models.FeedBackOverviewModel>" does not contain a definition for "Pager". Could not find the Pager extension method that accepts the first argument of type "System.Web.Mvc.HtmlHelper <Nop.Plugin.Misc.FeedbackAboutUs.Models.FeedBackOverviewModel>" (did you skip the using directive or the assembly reference?
@model FeedBackOverviewModel
@using Nop.Plugin.Misc.FeedbackAboutUs.Models
@using DevPartner.Nop.Plugin.Core.Services
@using DevPartner.Nop.Plugin.Core.Services.DPNop
@using DevPartner.Prosvet.Models
@using Nop.Core
@using Nop.Core.Domain.Catalog
@using Nop.Core.Infrastructure
@using Nop.Web.Framework.Themes
@using Nop.Web.Framework
@using Nop.Web.Framework.UI
@using Nop.Web.Framework.UI.Paging
.......................
@{
var pager = Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber");
}
public class PagingFilteringModel : BasePageableModel
{
public PagingFilteringModel()
{
this.FeedBacksList = new List<FeedbackOverView>();
}
public IList<FeedbackOverView> FeedBacksList { get; set; }
protected virtual string ExcludeQueryStringParams(string url, IWebHelper webHelper)
{
//comma separated list of parameters to exclude
const string excludedQueryStringParams = "pagenumber";
var excludedQueryStringParamsSplitted = excludedQueryStringParams.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string exclude in excludedQueryStringParamsSplitted)
url = webHelper.RemoveQueryString(url, exclude);
return url;
}
}
routes.CustomGenericPathRoute("FF.Plugin.Misc.SpeedFilters.Controllers.Category",
"{generic_se_name}",
new { controller = "SpeedFilters", action = "Category" },
new[] { "FF.Plugin.Misc.SpeedFilters.Controllers" });
case "product":
{
data.Values["controller"] = "Product";
data.Values["namespaces"] = new [] {"Nop.Web.Controllers"};
data.Values["action"] = "ProductDetails";
data.Values["productid"] = urlRecord.EntityId;
data.Values["SeName"] = urlRecord.Slug;
}
break;