nopcommerce - how to call insert method when click on product? -
i want display 10 viewed product in category page made insert method in
nopcommerce_3.20_source\libraries\nop.services\catalog\productservice.cs
public virtual void insertmostviewproduct(mostviewproduct product) { if (product == null) throw new argumentnullexception("product"); //insert _mostviewrepository.insert(product); //clear cache _cachemanager.removebypattern(products_pattern_key); //event notification _eventpublisher.entityinserted(product); }
my question how should call method when click on product , entry save in database?
please advise.
i tracked first question displaying 10 viewed product.
you have add functionality product service , in catalog controller of nop.web
project have add called newly created method in product service in product action
Comments
Post a Comment