problem with plugin operations

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anni tempo fa
Hello frnds,

i am just working on a plugin for the NopCommerce 2.40 for MISC category and followed various articles about that.
I am done with the plugin (Include some table creation in database). Code for the RegisterRoute Function for newly created route


routes.MapRoute("Plugin.Admin.Course.Backend",
            "Course/Admin/{action}/{id}",
             new { controller = "CourseAdmin", action = "Index", id = "" },
             new[] { "Nop.Plugin.Misc.CourseSystem.Controllers" }
            ).DataTokens.Add("Area", "Admin");


everything was ok until i try to implement the delete operation (as it always look for the /admin/CourseSystem/Delete/{ID}  as i am doing it with the help of DeleteConfirmation from HTMLExtensions which adds a form inside a div with action="admin/courseAdmin/Delete/{Id}" so when we click on the Delete button) and there are other inbuild functionality get affected when we do this. Is there anyway we can register/call our Routes like admin/courseAdmin/{Action}/{Id}.

I tried to do it but still not able to get it working. Is there any way to get this working or should i have to inpliment the Delete functionality from scratch in plugin.

Any type of help will be appreciated.

thanks
11 anni tempo fa
Sorry for consuming the valuable resourses provided to us by Nop Team i just came to figure it out that i just need to remove the  DataToken.add from there to get it working.

thanks
11 anni tempo fa
Ok now i got another problem,

As i am calling this plugin from Admin section (and delete functionality working fine including redirection to the web forms) but now i am having some problem with the menu item's routes they are missing the /Admin/ from the URL and giving "The resource cannot be found." error. Is there any way to get everything working fine (Delete functionality for the Plugin data and Menu route issues.)

Thanks and regards
Ram
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.