This is related to this post https://www.nopcommerce.com/boards/t/43586/adding-tab-via-plugin-in-version-380.aspx and I'm trying to replicate this in Nop 3.90 and the code works fine, however, if I try this code using product-edit, for some reason the tab (test config) is not showing in product edit.
Appreciate any help. Thanks!
public void HandleEvent(AdminTabStripCreated eventMessage)
{
_genericAttributeService, _permissionService);
int Id = Convert.ToInt32(System.Web.HttpContext.Current.Request.RequestContext.RouteData.Values["id"]);
var actionName = "Action";
var controllerName = "Sample";
var routeValues = new RouteValueDictionary()
{
{"Namespaces", "Nop.Plugin.Misc.Test.Controllers"},
{"area", null},
{"id", Id}
};
var urlHelper = new System.Web.Mvc.UrlHelper(eventMessage.Helper.ViewContext.RequestContext).Action(actionName, controllerName, routeValues);
eventMessage.BlocksToRender.Add(new System.Web.Mvc.MvcHtmlString(
"<script>"
+ "$(document).ready(function() {"
+ "$(\"<li><a data-tab-name='tab-name' data-toggle='tab' href='#tab-name'>"
+ _localizationService.GetResource("Test Config")
+ "</a></li> \").appendTo('#category-edit .nav-tabs:first');"
+ "$.get('" + urlHelper + "', function(result) {"
+ "$(\" <div class='tab-pane' id='tab-name'>\" + result + \"</div>\").appendTo('#category-edit .tab-content:first');"
+ "});"
+ "});"
+ "</script>"));
}