License Key Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 лет назад
cooldrl wrote:
Hi Ron, I have emailed you, as you said, as I would like a 3.40 version. However, you have not replied? Perhaps I am being impatient and you haven't had time yet?


Hope its Ok with Andy, made some changes to the original plugin
u can download it with the source code at:

Nop version 3.4
http://www.hezyziv.com/Licenses34.rar

Nop version 3.5
http://www.hezyziv.com/Licenses.rar
9 лет назад
Thank you, I have downloaded and will check it out asap. Thanks again.
9 лет назад
Hi Hezy

Many thanks for making this available for the guys, unfortunately I have a had a very difficult time these last
few months, and not been able to take care of this.

But I have also added it to our site today, so if for some reason they are not able to get it from you they can also download
it from here : https://www.nopresponsive.com/bitshift-license-plugin.
9 лет назад
Hey!

I am trying for a few hours now to get this plugin to work! But I just don't get it :(

I tried using Hezy's version for 3.50, first off, installation works fine (no errors that I know of) - but when I try to enter "Configure" - I got:
Exception Details: System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
[Exception: Property: FullMessage Error: The field FullMessage must be a string or array type with a maximum length of '4000'.]
   Nop.Data.EfRepository`1.Insert(T entity) in c:\nopCommerce\3.50_Source\Libraries\Nop.Data\EfRepository.cs:75...


With this innerException:
{"The view 'Nop.Plugin.Misc.Licenses.Views.Configure' or its master was not found or no view engine supports the searched locations. The following locations were searched:\r\n~/Themes/DefaultClean/Views/License/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml\r\n~/Themes/DefaultClean/Views/Shared/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml\r\n~/Views/License/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml\r\n~/Views/Shared/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml\r\n~/Administration/Views/License/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml\r\n~/Administration/Views/Shared/Nop.Plugin.Misc.Licenses.Views.Configure.cshtml"}


Maybe something with registering the routes didn't work?

Anyway - I tried fiddling around with the view coming back from the controller (LicenseController.cs)-
I changed this:
       return View("Nop.Plugin.Misc.Licenses.Views.Configure", model);
To this:
        return View("~/Plugins/Misc.Licenses/Views/Configure.cshtml", model);

But then I got the same exception, with this innerException:
{"c:\\nopCommerce\\3.50_Source\\Presentation\\Nop.Web\\Plugins\\Misc.Licenses\\Views\\Configure.cshtml(1): error CS0103: The name 'model' does not exist in the current context"}


I also tried taking version 3.40 and manually "busting" the errors for it to compile correctly with 3.50, still get the same results... :(

I am pretty new to MVC and nopCommerce, so sorry in advance :)

Thanks for the help!

-golot7
9 лет назад
hi golot

u need to copy all the views in the plugin
go to each one of the views -> properties
under Build action make sure its: content
Copy to output Directory: Copy if newer

this should work with the solution I uploaded
9 лет назад
Hey Hezy, thanks for the fast reply :)

I already did that... (took me 10 minutes to figure it out, but did it eventually)

But still no luck... :(

I also see the views are present in the compiled plugin folder (under Views subdir)...
9 лет назад
Hi everyone,
I managed to use the plugin with nopCommerce 3.50.
Here are the steps that I needed to do so that the plugin works.

1) change supported version (in <repodir>\src\Plugins\Nop.Plugin.Misc.Licenses\Description.txt) replace 3.30 by 3.50

2) Change the path to the views in <repodir>\src\Plugins\Nop.Plugin.Misc.Licenses\Controllers\LicenseController.cs replace  return View("Nop.Plugin.Misc.Licenses.Views.Configure", model);
return View("~/Plugins/Misc.Licenses/Views/Configure.cshtml", model);


and in  ProductKeyController.cs
return PartialView("Nop.Plugin.Misc.Licenses.Views.EditProductKey", model);
return PartialView("~/Plugins/Misc.Licenses/Views/EditProductKey.cshtml", model);


3) Check that all views and the web.config is "Copy if newer" and that the output directory is Ok in project settings.

4) In the Nuget manager MVC5 packages should be used also in License plugins. In the provided version the license plugin do not target MVC 5

5) In another plugin take the web.config and copy to the content in the License plugin web.config

Sometimes you have to Clean/Rebuild so that the views or the web.configs are updated in the output dir.

Thanks
9 лет назад
Project updated to 3.5 download: http://shop.getyournet.ch/Content/Images/uploaded/Nop.Plugin.Misc.Licenses-35.zip
9 лет назад
gyn wrote:

Thanks a lot.

But

return PartialView("~/Plugins/Misc.Licenses/Views/EditProductKey.cshtml", model);

in ProductKeyController.cs

Return nothing...


when I wrote for example  return Content("TEST");

I'll see this text on my tab "License Key"

What I did wrong?
9 лет назад
Do you have any exceptions thrown?
-> In visual Studio (Ctrl + Alt + E) check "Thrown" for Common Language Runtime Exceptions ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.