Close

SevenSpikes.Nop.Plugins.QuickView.Controllers.QuickViewCatalogController

Devanshi
7 years ago
#14064 Quote
Avatar
  • 1
An error occurred when trying to create a controller of type 'SevenSpikes.Nop.Plugins.QuickView.Controllers.QuickViewCatalogController'. Make sure that the controller has a parameterless public constructor.

I tried to create one parameterless public constructor in product controller.

Browser Error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[MissingMethodException: Method not found: 'Void Nop.Web.Controllers.ProductController..ctor(Nop.Web.Factories.IProductModelFactory, Nop.Services.Catalog.IProductService, Nop.Core.IWorkContext, Nop.Core.IStoreContext, Nop.Services.Localization.ILocalizationService, Nop.Core.IWebHelper, Nop.Services.Catalog.IRecentlyViewedProductsService, Nop.Services.Catalog.ICompareProductsService, Nop.Services.Messages.IWorkflowMessageService, Nop.Services.Orders.IOrderReportService, Nop.Services.Orders.IOrderService, Nop.Services.Security.IAclService, Nop.Services.Stores.IStoreMappingService, Nop.Services.Security.IPermissionService, Nop.Services.Logging.ICustomerActivityService, Nop.Services.Events.IEventPublisher, Nop.Core.Domain.Catalog.CatalogSettings, Nop.Core.Domain.Orders.ShoppingCartSettings, Nop.Core.Domain.Localization.LocalizationSettings, Nop.Web.Framework.Security.Captcha.CaptchaSettings, Nop.Core.Caching.ICacheManager)'.]
   SevenSpikes.Nop.Plugins.QuickView.Controllers.QuickViewCatalogController.Lv5NFCWtfDN98XFPkpW(Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object , Object ) +0
   SevenSpikes.Nop.Plugins.QuickView.Controllers.QuickViewCatalogController..ctor(IProductModelFactory productModelFactory, ICategoryService categoryService, IManufacturerService manufacturerService, IProductService productService, IVendorService vendorService, IProductTemplateService productTemplateService, IProductAttributeService productAttributeService, IWorkContext workContext, IStoreContext storeContext, ITaxService taxService, ICurrencyService currencyService, IPictureService pictureService, ILocalizationService localizationService, IMeasureService measureService, IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter, IWebHelper webHelper, ISpecificationAttributeService specificationAttributeService, IDateTimeHelper dateTimeHelper, IRecentlyViewedProductsService recentlyViewedProductsService, ICompareProductsService compareProductsService, IWorkflowMessageService workflowMessageService, IProductTagService productTagService, IOrderReportService orderReportService, IOrderService orderService, IAclService aclService, IStoreMappingService storeMappingService, IPermissionService permissionService, IDownloadService downloadService, ICustomerActivityService customerActivityService, IProductAttributeParser productAttributeParser, IShippingService shippingService, IEventPublisher eventPublisher, MediaSettings mediaSettings, CatalogSettings catalogSettings, VendorSettings
SDobrev
7 years ago
#14074 Quote
Avatar
  • 283
Hi,

You have modified the constructor of the ProductController. Please revert the changes and use property injection instead of constructor injection.

private IMyService _myService;

public IMyService MyService
{
    get
    {
        if (_myService == null)
        {
            _myService = EngineContext.Current.Resolve<IMyService>();
        }

        return _myService;
    }
}
Best Regards,
Stoyan Dobrev
Nop-Templates.com
rezarart9
5 years ago
#15640 Quote
Avatar
  • 2
I'm having trouble guiding you precisely