1

I want to change some code in an action of the CategoryNavigation action from the CatalogController. I don't want to alter the core code of NopCommerce so i need to try to overide the code with my own custom code and this i want to do with my plugin.

What I basically want is the same function of the original code but with some custom tweaks.

I am having this class:

public partial class NumberofVisittoProducts : BaseEntity
    {
        public int ProductId { get; set; }
        public int ProductVisitStatistics{ get; set; }
    }

So i want to increment ProductVisitStatistics Value when Particular Product Detail page is open.

So far i have successfully managed to create this table with my plugin.

I have tried to study alot regarding overriding a Controller from the below link:

How to implement an Action Filter in NopCommerce

Very Close but not quite able to override core view nopcommerce

http://www.nopcommerce.com/boards/t/24127/overriding-other-controllers-and-their-routes.aspx

So I am so much confused between the two.

Now say i use Action filter then I am not getting it how do i get that Particular ProductId then.

For 2nd Method that is override the Route i am not getting that how do i use it and perform my functionality like update ProductVisitStatistics in my table.

So If anybody can Please help me with this??

I am ready to send my plugin project if anybody wants to see what i have done.

I Love Stackoverflow
  • 6,738
  • 20
  • 97
  • 216

0 Answers0