logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Monday, June 13, 2022 10:21:56 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
How can I add a link to the admin menu so that the site will look for the controller under the Shipping folder?
I have a new controller W2M_DeliveryDaySettingsController with ActionResult for the view of DeliveryDaySettings()
I added this to the admin menu under Shipping
<menuItem title="Estimated Delivery Days" controller="EstimatedDeliveryDaysSettings" action="DeliveryDaysSettings" description="Configure settings for W2M Estimated Delivery Days." />

I had to move the view out of the Shipping subfolder to the Views folder in order for the site to find it.
Thanks

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

sweeperqb  
#2 Posted : Monday, June 13, 2022 10:32:25 AM(UTC)
sweeperqb

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 5/30/2020(UTC)
Posts: 125

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Where is the controller located in your directory structure, and do you have any special routing rules set up? The reason I ask is that your controller is named W2M_DeliveryDaySettingsController, but your menuItem has the controller listed as EstimatedDeliveryDaySettings instead of W2M_EstimatedDeliveryDaySettings.

Regarding the Views folder, MVC typically looks at /Areas/Admin/Views/{controller_name}/{action_name}.cshtml and /Areas/Admin/Views/Shared/{action_name}.cshtml unless you hard code the path, like return View("~/Views/Shipping/DeliveryDaySettings.cshtml", model);
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.