Not looking in correct place for configure.cshtml view of new plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi,

I am developing a SagePayDirect plugin to use the integrated version of SagePay rather than the offsite or Iframe version.
I have built the basic plugin using the SagePayServer as a basis to give me the same configuration etc.

I have yet to put any processing code, but I have added the config code for the install.

It all compiles fine and copies over the DLLs fine.  It shows up on the list of plugins and installs fine adding relevant stuff to DB, but when it comes to configure I get this...

he view 'Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Themes/DarkOrange/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Themes/DarkOrange/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Themes/DarkOrange/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Themes/DarkOrange/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Administration/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Administration/Views/PaymentSagePayDirect/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml
~/Administration/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.cshtml
~/Administration/Views/Shared/Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure.vbhtml


This is my controller code:


        [AdminAuthorize]
        [ChildActionOnly]
        public ActionResult Configure()
        {
            var model = new ConfigurationModel();
            model.AdditionalFee = _SagePayDirectPaymentSettings.AdditionalFee;
            model.ConnectTo = _SagePayDirectPaymentSettings.ConnectTo;

            model.PartnerID = _SagePayDirectPaymentSettings.PartnerID;
            model.TransactType = _SagePayDirectPaymentSettings.TransactType;

            model.VendorName = _SagePayDirectPaymentSettings.VendorName;
            model.NotificationFullyQualifiedDomainName = _SagePayDirectPaymentSettings.NotificationFullyQualifiedDomainName;
            model.ReturnFullyQualifiedDomainName = _SagePayDirectPaymentSettings.ReturnFullyQualifiedDomainName;
            model.Profile = _SagePayDirectPaymentSettings.Profile;

            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.SIMULATOR });
            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.TEST });
            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.LIVE });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.PAYMENT });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.DEFERRED });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.AUTHENTICATE });

            return View("Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure", model);
        }

        [HttpPost]
        [AdminAuthorize]
        [ChildActionOnly]
        public ActionResult Configure(ConfigurationModel model)
        {
            if (!ModelState.IsValid)
                return Configure();

            //save settings
            _SagePayDirectPaymentSettings.AdditionalFee = model.AdditionalFee;
            _SagePayDirectPaymentSettings.ConnectTo = model.ConnectTo;
            _SagePayDirectPaymentSettings.PartnerID = model.PartnerID;
            _SagePayDirectPaymentSettings.TransactType = model.TransactType;
            _SagePayDirectPaymentSettings.VendorName = model.VendorName;
            _SagePayDirectPaymentSettings.NotificationFullyQualifiedDomainName = model.NotificationFullyQualifiedDomainName;
            _SagePayDirectPaymentSettings.ReturnFullyQualifiedDomainName = model.ReturnFullyQualifiedDomainName;
            _SagePayDirectPaymentSettings.Profile = model.Profile;
            _settingService.SaveSetting(_SagePayDirectPaymentSettings);


            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.SIMULATOR });
            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.TEST });
            model.ConnectToList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.ConnectToValues.LIVE });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.PAYMENT });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.DEFERRED });
            model.TransactTypeList.Add(new SelectListItem() { Text = SagePayDirectPaymentSettings.TransactTypeValues.AUTHENTICATE });

            return View("Nop.Plugin.Payments.SagePayDirect.Views.PaymentSagePayDirect.Configure", model);
        }


The relevant view is in at: plugins/Nop.Plugin.Payments.SagePayDirect/Views/PaymentSagePayDirect/Configure.cshtml

How to I make sure that I includes my new plugin folder in the routing for the view?

Ta
Ben
12 years ago
In VS, for your .cshtml file, in Properties, be sure that Build Action is set to "Embedded Resource"
12 years ago
Yup.  Checked that first....which is why I'm stumped.
12 years ago
HELP!  Still stuck on this and it's driving me crazy.  I'm fairly certain I've missed something obvious...but I can't figure it out...
12 years ago
Solved!
The default namespace in the project properties had an _ instead of a . in the name.  Grrrrr!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.